bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

completion-prefix-display-length doesn't check for common prefix


From: Grisha Levit
Subject: completion-prefix-display-length doesn't check for common prefix
Date: Thu, 21 Apr 2016 14:42:24 -0400

f() { COMPREPLY=(aaaaaaaaaaaaaa bbbbbbbbbbbbbb cccccccccccccc); }
complete -F f f
bind 'set completion-prefix-display-length 2'

$ f dddd [TAB][TAB]
...aaaaaaaaaa  ...bbbbbbbbbb  ...cccccccccc

None of the completion entries share a common prefix, though the docs
suggest that only common prefixes are removed:

    The length in characters of the common prefix of a list of
possible completions
    that  is  displayed without modification.  When set to a value
greater than zero,
    common prefixes longer than this value are replaced with an ellipsis when
    displaying possible completions.


colored-completion-prefix has the same issue, in that it colors the
first n characters, where n is the length of the word being completed.

On a related note, colored-completion-prefix has no effect if
completion-prefix-display-length is greater than 0.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]