Ken Bloom <kbloom / gmail.com> wrote:
> On Mon, 18 Sep 2006 13:53:44 +0900, Reprisal wrote:
> 
>>> I prefer my gvim and my xterm, thank you very much. How do I turn  
>>> off tab
>>> completion in IRB?
>> 
>> irb -f --readline      #ignore .irbrc file and load readline w/o tab  
>> completion
>> irb --noreadline     #disable readline altogether
> 
> It seems that I don't have a .irbrc, but I still have tab completion. I'd
> like to have readline support but no completion, but I don't know what to
> put in my .irbrc (or .inputrc) to disable this.

I figured it out. Somehow, at the end of
/usr/lib/ruby/1.8/irb/completion.rb, I have the lines:

if Readline.respond_to?("basic_word_break_characters=")
  Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{("
end
Readline.completion_append_character = nil
Readline.completion_proc = IRB::InputCompletor::CompletionProc

So I just put code in my .irbrc to undo it:
#disable completion, so that hitting tab just inserts a tab character
Readline.completion_append_character = ""
Readline.completion_proc = lambda {|x| x+"\t"}

--Ken Bloom

-- 
Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/