Re: [Help-bash] Completion Items Starting With Colon Character
From:
Chet Ramey
Subject:
Re: [Help-bash] Completion Items Starting With Colon Character
Date:
Fri, 22 Aug 2014 11:29:49 -0400
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
On 8/22/14, 6:46 AM, Ümit Kablan wrote:
> Hi,
>
> I have problems in completion with colon-starting items, which I thought
> might be a bug:
>
>http://stackoverflow.com/questions/25362968/bash-command-line-tab-completion-colon-character
>
> Do you have any ideas about why shell yields ":" after I press tab for
> completion?
Sure. This has come up a number of times in the past.
The colon breaks words for the completion system (look at the description
of the COMP_WORDBREAKS shell variable), so when you type
progname :[TAB]
the completion system gets an empty word to complete. If all of the
possible completions have `:' as the longest common prefix, then the
completion system will insert the colon into the line.
Chet
--
``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/