[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, 02 Jun 2016 15:23:12 -0000 |
User-agent: |
G2/1.0 |
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.
- completion-prefix-display-length doesn't check for common prefix,
Grisha Levit <=