Skip to content

Cannot tab-complete quoted words #444

Closed

Description

@postmodern

Description

I am attempting to port some Ruby code that relies on how Readline handled quoted words and tab-completion. I noticed that Reline lacks a quoting_detection_proc hook. I also noticed while testing that it cannot tab-complete quoted words for some reason?

Example

require 'reline'

Reline.completion_proc = proc { |word,preposing| %w[foo] } # should always tab-complete to 'foo'
p Reline.readline('> ')

Test 1:

> bar f<TAB>foo
"bar foo"

Test 2:

bar "f<TAB>"f"
"bar \"f\""

Test 3:

bar "fo<TAB>"fo"
"bar \"fo\""

Terminal Emulator

  • LANG=en_US.UTF-8
  • TERM=xterm-256color

Version

  • reline 0.3.1
  • ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]

Activity

  1. OscarAkaElvis commented on May 10, 2022

    @OscarAkaElvis

    This could be very useful to migrate from readline (deprecated in ruby 3) to reline in some tools like evil-winrm, so thanks for asking this. If finally is implemented that could ease a lot our work to migrate to reline our auto complete feature. Thanks.

  2. added
    enhancement
    on Jun 7, 2023
  3. added
    bug
    on Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions