Created
July 18, 2012 09:53
-
-
Save pmeinhardt/3135332 to your computer and use it in GitHub Desktop.
patch irb completion
This file contains 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
--- completion.rb 2012-07-18 11:48:41.000000000 +0200 | |
+++ completion-2.rb 2012-07-18 11:53:02.000000000 +0200 | |
@@ -165,6 +165,7 @@ | |
rescue Exception | |
name = "" | |
end | |
+ next unless name.class == String | |
next if name != "IRB::Context" and | |
/^(IRB|SLex|RubyLex|RubyToken)/ =~ name | |
candidates.concat m.instance_methods(false).collect{|x| x.to_s} |
Yeah, thanks. I've used these before, but this was really a different thing (it's been a while, but roughly the following issue): IRB and Rails console were crashing on this line when trying to tab-complete a statement with multiple method invocations (i.e. multiple dots, like User.first.
+Tab
). Quite annoying. Never happened to me again ever since. My rbenv-installed versions work fine as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hm dunno if they do anything about it, but maybe you could check out irb-tools or pry for more command line awesomeness :-)