Re: Why escape char `:' with `\' when auto completing filenames?
From:
Clark J. Wang
Subject:
Re: Why escape char `:' with `\' when auto completing filenames?
Date:
Fri, 18 Feb 2011 19:53:46 +0800
On Fri, Feb 18, 2011 at 6:48 PM, Pierre Gaston <pierre.gaston@gmail.com>wrote:
>
>
> On Fri, Feb 18, 2011 at 12:17 PM, Clark J. Wang <dearvoid@gmail.com>wrote:
>
>> On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab <schwab@linux-m68k.org
>> >wrote:
>>
>> > Maarten Billemont <lhunath@gmail.com> writes:
>> >
>> > > Why are we escaping all word break characters? rm file:name and rm
>> > file\:name are effectively identical, I'm not sure I see the need for
>> > escaping it.
>> >
>> > How do you differentiate between completing file:name and completing
>> > file:name?
>> >
>> >
>> I don't understand what did you mean. :(
>
>
> If you complete PATH, you want to be able to press tab after:
> PATH=/bin:/home/clark/ so that it completes "/home/clark"
> If you complete a file named 'foo:bar' you want to be able to press tab
> after: ls foo:b so that it completes just "foo:b"
> So how bash can decide if if it should complete just "b" like in the
> example of PATH or "foo:b"?
>
>
>
That makes it more clear to me. Thanks.
--
Clark J. Wang