You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alt+. inserts the last word from previous line.
Simply pressing it after an empty line does not trigger this because empty lines are not added to history (at least in irb). But you can edit previous lines and then go back to editing current line:
> rm ~/.irb_history
> irb
irb(main):001:0> # Now press Up, Ctrl+U (making last history line empty), Down (to edit current line again), Alt+.
irb(main):002:0* /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:7560:in `_extract_last_quote': empty char-class: /((?:\\.|[^])+?) *$/ (RegexpError)
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:7553:in `history_arg_extract'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:7465:in `rl_yank_nth_arg_internal'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:7525:in `rl_yank_last_arg'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:4329:in `_rl_dispatch_subseq'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:4338:in `_rl_dispatch_subseq'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:4318:in `_rl_dispatch'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:4734:in `readline_internal_charloop'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:4808:in `readline_internal'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/rbreadline.rb:4830:in `readline'
from /usr/local/lib/ruby/gems/2.2.0/gems/rb-readline-0.5.3/lib/readline.rb:45:in `readline'
from /usr/local/lib/ruby/2.2.0/irb/input-method.rb:150:in `gets'
from /usr/local/lib/ruby/2.2.0/irb.rb:469:in `block (2 levels) in eval_input'
from /usr/local/lib/ruby/2.2.0/irb.rb:623:in `signal_status'
from /usr/local/lib/ruby/2.2.0/irb.rb:468:in `block in eval_input'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:188:in `call'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:188:in `buf_input'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:103:in `getc'
from /usr/local/lib/ruby/2.2.0/irb/slex.rb:205:in `match_io'
from /usr/local/lib/ruby/2.2.0/irb/slex.rb:75:in `match'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:282:in `token'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:264:in `lex'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:235:in `block (2 levels) in each_top_level_statement'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:231:in `loop'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:231:in `block in each_top_level_statement'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:230:in `catch'
from /usr/local/lib/ruby/2.2.0/irb/ruby-lex.rb:230:in `each_top_level_statement'
from /usr/local/lib/ruby/2.2.0/irb.rb:485:in `eval_input'
from /usr/local/lib/ruby/2.2.0/irb.rb:395:in `block in start'
from /usr/local/lib/ruby/2.2.0/irb.rb:394:in `catch'
from /usr/local/lib/ruby/2.2.0/irb.rb:394:in `start'
from /usr/local/bin/irb:11:in `<main>'
To be clear, type something on first line (like the comment above) and press enter.
Then on second line follow the instructions:
press Up, Ctrl+U (making last history line empty), Down (to edit current line again), Alt+.
and it immediately crashes.
The text was updated successfully, but these errors were encountered:
Alt+. inserts the last word from previous line.
Simply pressing it after an empty line does not trigger this because empty lines are not added to history (at least in irb). But you can edit previous lines and then go back to editing current line:
To be clear, type something on first line (like the comment above) and press enter.
Then on second line follow the instructions:
press Up, Ctrl+U (making last history line empty), Down (to edit current line again), Alt+.
and it immediately crashes.
The text was updated successfully, but these errors were encountered: