ruby / ruby/irb

Alt + . key binding doesn't cycle through last used arguments

Open
#326 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
478
Forks
158
Avg merge
1d 12h
Merged PRs (30d)
12

Description

Description

What are your expected behavior and actual behavior of your environment?

Alt + . used to cycle through the previous lines arguments in readline, but it doesn't do anything in the newer reline versions.

The behaviour in irb 1.0 / ruby 2.6 was the following:


irb(main):001:0> puts "hello"
hello
=> nil
irb(main):002:0> puts "world"
world
=> nil
irb(main):003:0> 

pressing Alt + . would cycle the prompt through the output "hello", "world"

irb(main):003:0> "hello"
irb(main):003:0> "world"
irb(main):003:0> 

Result of irb_info

irb(main):001:0> irb_info
=> 
Ruby version: 3.0.3                            
IRB version: irb 1.4.1 (2021-12-25)            
InputMethod: ReidlineInputMethod with Reline 0.3.1 and /home/daniel/.inputrc
RUBY_PLATFORM: x86_64-linux                    
LANG env: en_US.UTF-8                          
East Asian Ambiguous Width: 1            

Terminal Emulator

Guake and Gnome Terminal

Setting Files

cat ~/.inputrc 
# Make autocompletion case insensitive
set completion-ignore-case on

# Treat hyphens and underscores the same
set completion-map-case on

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in IRB 1.4.1 with Reline 0.3.1 using the commands shown, then compare Alt + . with the older readline behavior described. Done means Alt + . cycles through arguments from previous input lines in the prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.