We didn't send any flags to the pager, as a result ansi codes were not applied unless the user had properly set up their LESS env variable. This was often not the case, resulting in broken and ugly output. This commit sends along the proper flags whenever we use the pager, regardless of the user's LESS variable
The previous table output was geared mostly for `ls _pry_`, which isn't a common of hierarchy. After feedback from users such as @envygeeks, we found a few tweaks that would help the really-small layers such as those found in Rails or in small classes, namely: - Rolling it up onto one line, if possible - Highlighting the heading in the colors familiar to users of GNU ls for "directory" style Additionally, I took the opportunity for toning down the private/protected method colors, because before they were green and yellow, now they're both "muted terminal blue" Without the ability to really get in and really distinguish colors (e.g. using 256 colors), giving "protected" such a loud color seems wrong. Before recoloring: #813 (comment) After: #813 (comment)
The problem was that Pry#rep() no longer works on its own, it's necessary to use Pry#repl() instead. This is because many new API, like Pry::CodeObject.lookup now get the target binding directly from the _pry_ instance (Pry#current_context), rather than requiring it to be passed in separately. This saves us a parameter. The reason Pry#rep doesnt work with Pry::CodeObject.lookup (and so show-source/show-doc etc) is that the binding_stack is only set up in Pry#repl_prologue, and it is the binding_stack (via Pry#current_context) that is accessed by Pry::CodeObject and pals.
Oops, forgetting this meant that 'gist' command would error out with ugly messages rather than prompting the user to 'install-command'
This enables a simplified UI, i.e: gist my_file.rb instead of gist -f my_file.rb and `gist my_method` instead of `gist -m my_method`. Unfortunately, we had to kill our tests in the process of doing this (gist_spec.rb is just commented out) - however since play and save-file have tests and they use the same Pry::CodeCollector object 'gist' is indirectly tested. Nonetheless, we should re-add tests at some point
There was a bug where if 'edit --ex' was invoked in a patched method context it would instead to the equivalent of 'edit --method' (patching the current method rather than the exception)
* use a plain old Slop instance instead of `Options`; * remove `ClassCommand::Options` and its tests; * add clearer subcommand example (for `Command#subcommand` method); * refactor `ClassCommand#slop`; * refactor `ClassCommand#complete`. Slop v3.4.0 has introduced full-featured subcommands. There is no need in Pry specific code anymore.