bug-bash
[Top][All Lists]
Advanced

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

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


From: Chet Ramey
Subject: Re: completion-prefix-display-length doesn't check for common prefix
Date: Fri, 22 Apr 2016 15:23:00 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 4/21/16 2:42 PM, Grisha Levit wrote:
> 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:

Bash-4.4 doesn't do this.

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

Yes, the current implementation prioritizes completion-prefix-display-length
over colored-completion-prefix

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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