Project

General

Profile

Actions

Bug #14676

closed

On Windows Readline's input is not correctly filled after autocomplete

Bug #14676: On Windows Readline's input is not correctly filled after autocomplete

Added by graywolf (Gray Wolf) over 7 years ago. Updated over 7 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
[ruby-core:86494]

Description

When Readline.completion_proc returns more than one match, you are presented with empty line insted of what you have already put in.

require 'readline' Readline.completion_proc = Proc.new do |word| ['foo', 'bar'] end while buf = Readline.readline('> ') pp buf end 

You will end up with

> aa<TAB> bar foo > <ENTER> "" 

Works as expected on linux.

Updated by graywolf (Gray Wolf) over 7 years ago Actions #1 [ruby-core:86496]

Works when the string is actual prefix for the completion.

require 'readline' Readline.completion_proc = Proc.new do |word| ['aafoo', 'aabar'] end while buf = Readline.readline('> ') pp buf end 

produces

> aa<TAB> aabar aafoo > aa<ENTER> "aa" 

However, it would still be nice to have it behave same way on linux and windows.

Updated by hsbt (Hiroshi SHIBATA) over 7 years ago Actions #2 [ruby-core:86500]

  • Status changed from Open to Third Party's Issue
Actions

Also available in: PDF Atom