Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot tab-complete quoted words #444

Open
postmodern opened this issue Apr 19, 2022 · 1 comment
Open

Cannot tab-complete quoted words #444

postmodern opened this issue Apr 19, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@postmodern
Copy link
Member

postmodern commented Apr 19, 2022

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]
@OscarAkaElvis
Copy link

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.

@ima1zumi ima1zumi added the enhancement New feature or request label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants