Project

General

Profile

Actions

Backport #4635

closed

Readline.completion_append_character

Added by no6v (Nobuhiro IMAI) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
[ruby-dev:43456]

Description

=begin
いまいです。

GNU readline library での話ですが、6 系のものを使うと TAB キーでの補完
後に Readline.completion_append_character がデフォルトの " " に戻ってし
まいます。しかも、" " 以外にセットしても、補完された単語にはデフォルト
の " " が付加されます。

require "readline"

p RUBY_DESCRIPTION
p Readline::VERSION
p Readline.completion_append_character
Readline.completion_proc = ->(input){[input]}
IO.pipe do |r, w|
Readline.output = (w << "Readline\t").reopen("/dev/null")
Readline.input = r
Readline.completion_append_character = nil
p Readline.completion_append_character
p Readline.readline
p Readline.completion_append_character
end

Debian GNU/Linux (sid) libreadline-gplv2-dev (5.2-8)

>> "ruby 1.9.3dev (2011-04-29 trunk 31382) [x86_64-linux]"

>> "5.2"

>> " "

>> nil

>> "Readline"

>> nil

Debian GNU/Linux (sid) libreadline6-dev (6.2-1)

>> "ruby 1.9.3dev (2011-04-29 trunk 31382) [x86_64-linux]"

>> "6.2"

>> " "

>> nil (nil にセットは出来るけど)

>> "Readline " (末尾にスペースが付いてしまって)

>> " " (リセットされてしまう)

changelog に以下のように書いてあって、補完後にリセットされるのは意図的
なようです。Ruby の readline 側で何とかならないものでしょうか?

This document details the changes between this version, readline-6.0,
and the previous version, readline-5.2.
(snip)
f. Fixed a bug that caused the completion append character to not be reset to
the default after an application-specified completion function changed it.

Nobuhiro IMAI
Key fingerprint = E57F 2482 4074 13BC 3B9A 165B C689 5B16 A620 4657
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #1823: Readline Command CompletionRejectedkouji (Kouji Takao)07/28/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0