Created
April 30, 2009 19:44
-
-
Save rbranson/104640 to your computer and use it in GitHub Desktop.
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
| # | |
| # This monkeypatch will tell IRB completion to ignore methods that also | |
| # happen to be in the "Object" class as most of the time I don't care | |
| # about these. This hack only steps in when you've entered something like | |
| # "foo." or "Foo." or "Foo::", otherwise you'll be working with the | |
| # full list of methods, including the ones from Object. k? | |
| # | |
| Readline.completion_proc = proc do |input| | |
| IRB::InputCompletor::CompletionProc.call(input).reject do |o| | |
| o == nil or (input =~ /(\.|::)$/ and Object.methods.include?(o[/[^\.:]*$/])) | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment