tab completion no longer works on irb3.0
rb(main):001:0> source 'li [then I hit tab...]
linking.rb list_load.rb list_load_OLD.rb
irb(main):001:0> source 'lis [then I hit tab again...]
irb(main):001:0> source 'list_load.rb' [then I hit tab again...]
in irb3.0, hitting tab after typing "source 'li" gives.
irb(main):001:0' source 'li'
Here are my version numbers:
ayerie:simon$ irb3.0 -v
irb 1.3.0 (2020-12-25)
ayerie:CHLOE simon$ ruby3.0 -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin16]
Updated by crocarneiro (Carlos Carneiro) 7 months ago
I could not reproduce the old version behaviour. I got back to irb 1.1.0 and the autocomplete behaviour is the same as the version 1.3.4. My steps:
$ touch linking.rb
$ touch list_load.rb
$ touch list_load_OLD.rb
2.5.0 :001 > source 'li
Hitting tab gives me:
2.5.0 :001 > source 'li'
irb -v: irb 1.1.0 (2019-11-21)
ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
OS: Ubuntu 20.04.1 LTS
How you achieved that behaviour in the old version? How was your "~/.irbrc" file?
Updated by xtkoba (Tee KOBAYASHI) 7 months ago
What is confusing is that the behavior of IRB changes drastically with
readline.so. I suppose that Ruby 2.5 of the main issue is the case when
readline.so is installed, and that the rest (Ruby 3.0 of the main issue and Ruby 2.5 of #note-1) are when it is not installed.
My observation is as follows. For Ruby 2.5.8:
/$ ruby --version ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux] /$ irb --version irb 0.9.6(09/06/30) /$ [Make sure that readline.so exists] /$ irb irb(main):001:0> "[Press Tab twice] bin/ dev/ home/ lib64/ mnt/ proc/ run/ sys/ usr/ boot/ etc/ lib/ media/ opt/ root/ sbin/ tmp/ var/ [Terminate IRB] /$ [Remove readline.so] /$ irb irb(main):001:0> "[Press Tab here, and ...] irb(main):001:0> " [<- "\t" is shown]
For Ruby 2.7.2:
/$ ruby --version ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] /$ irb --version irb 1.2.6 (2020-09-14) /$ [Make sure that readline.so exists] /$ irb irb(main):001:0> "[Nothing happens when Tab is pressed many times] [Terminate IRB] /$ [Remove readline.so] /$ irb irb(main):001:0> "[Press Tab here, and ...] irb(main):001:0> ""
As you can see above, there are four patterns of Tab behavior depending on the version of IRB/Ruby and the existence of