Support ls command from irb#172
Closed
st0012 wants to merge 5 commits into
Closed
Conversation
st0012
commented
Jul 13, 2021
| end | ||
| end | ||
|
|
||
| extend IRB::ExtendCommandBundle |
Member
Author
There was a problem hiding this comment.
This module injects irb commands as methods. Pretty handy 👍
https://github.com/ruby/irb/blob/master/lib/irb/extend-command.rb
| # * Executes `irb`'s `ls` command with the given obj. | ||
| when 'ls' | ||
| if @ui.remote? | ||
| @ui.puts "not supported on the remote console." |
Member
Author
There was a problem hiding this comment.
For some reason it can't run on remote console either. I think we can sort it out later.
| end | ||
|
|
||
| def reset_irb_context | ||
| IRB.conf[:MAIN_CONTEXT] = nil |
Member
Author
There was a problem hiding this comment.
I'm not sure if this is needed, but just in case.
Collaborator
|
Thanks, but I can't accept this PR because it introduced IRB's feature and I can't manage them. Can we copy the implementation from irb? |
Member
Author
|
ok. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #29
Some notes:
lscommand can't disable coloring becauseirb's implementation seems to ignore the config. I'll open an issue in the irb repo later.show_source) with very few changes. But let's do that in another PR.