ruby / ruby/irb

Completion does not work after [

Open
#550 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Completion does not seem to work immediately after [.
It works after (, {, etc.

Steps to Reproduce
Scenario:

Type [ and RUBY_VER, then type TAB.

Expected:

Type [ and RUBY_VER.

% irb
irb(main):001:1* [RUBY_VER
                  RUBY_VERSION

RUBY_VERSION appears in the dialog.

Type TAB to complete RUBY_VERSION.

irb(main):001:1* [RUBY_VERSION
                  RUBY_VERSION
Actual:

Type [ and RUBY_VER.

% irb
irb(main):001:1* [RUBY_VER

No dialog appears.

Type TAB.

irb(main):001:1* [RUBY_VER

RUBY_VERSION does not complete.

Result of irb_info

Please paste the result of irb_info command in IRB.

Ruby version: 3.1.3
IRB version: irb 1.6.3 (2023-03-06)
InputMethod: RelineInputMethod with Reline 0.3.2
RUBY_PLATFORM: amd64-freebsd13
LANG env: ja_JP.UTF-8
East Asian Ambiguous Width: 2

Terminal Emulator

PuTTYrv 0.78-ranvis (CJK)

Setting Files

No ~/.irbrc or ~/.inputrc.

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

Start by reproducing the completion behavior in IRB using the reported Ruby 3.1.3 and IRB 1.6.3 environment, comparing [ with ( and {; irb_info provides the relevant version and input-method details. Done means RUBY_VERSION appears and completes after typing [ and RUBY_VER, with the behavior covered by an appropriate regression test.

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.