bug-bash
[Top][All Lists]
Advanced

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

Re: Why escape char `:' with `\' when auto completing filenames?


From: Chet Ramey
Subject: Re: Why escape char `:' with `\' when auto completing filenames?
Date: Thu, 17 Feb 2011 17:02:07 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 2/17/11 10:03 AM, Clark J. Wang wrote:
>>>>>> "Clark J. Wang" <address@hidden> writes:
>>>>>>
>>>>>>> I think char `:' is not special in bash.
>>>>>>
>>>>>> $ printf "%q\n" "$COMP_WORDBREAKS"
>>>>>> $' \t\n"\'><=;|&(:'
>>>>>>
>>>>>>
>>>>> I don't think that explain the issue.
>>>>
>>>>   /* characters that need to be quoted when appearing in filenames. */
>>>>  rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~";
>>>> /*}*/
>>>>
>>>>
>>> So that's  problem. I don't think @=: need to be treated specially. Any
>>> reason?
>>
>> They are used as word break characters during completion.
>>
>>
> That's the way it's implemented but that does not mean that's reasonable.

For pete's sake.  If you don't think they should be word break characters,
modify the value of COMP_WORDBREAKS.  For the record, @ causes a word break
so you can complete hostnames more easily, = breaks so you can complete
filenames on the rhs of assignment statements, and : breaks so you can
complete filenames in words that look like $PATH.

Are we really spending this much time on a cosmetic issue?

-- 
``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]