Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: erroneous completion when using {}
- X-seq: zsh-workers 12104
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: erroneous completion when using {}
- Date: Wed, 28 Jun 2000 11:22:20 +0200 (MET DST)
- In-reply-to: Jan Fedak's message of Tue, 27 Jun 2000 17:55:58 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Jan Fedak wrote:
> When I use {} in a glob pattern like this:
>
> $ cat some/path/{directory\ 1, directory\ 2,_
> ^
> cursor :)
>
> and hit tab, my precious backslashes get lost:
>
> $ cat some/path/{directory 1,directory 2,directory\
Oh, this is ugly. The problem is this: the completion code gets the
line tokenized, where the backslashes are turned int Bnull tokens. It
has to remove them for normal completion. After that comes the code
that looks for brace expansions, so that can't put the backslashes
back because it can't find where they were. Doing the brace expansion
stuff before removing the Null tokens won't work either because the
brace expansion code has to remove the `{foo,' things from the string.
And just quoting the strings the brace expansion code removes won't
work either because of `{{a,b},' (the braces of `{a,b}' would be
quoted). So we either need a special quoting function or a good idea.
I've got to think about this some more.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author