* erroneous completion when using {}
@ 2000-06-27 15:55 Jan Fedak
2000-06-27 16:11 ` Andrej Borsenkow
0 siblings, 1 reply; 3+ messages in thread
From: Jan Fedak @ 2000-06-27 15:55 UTC (permalink / raw)
To: Zsh workers
Hello.
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\
That is wrong and my glob pattern won't succeed later.
Jan
P.S. And my version: 3.1.6-dev-20, I use the new completion system.
--
Jan Fedak talk:jack@tornado.sh.cvut.cz
mailto:J.Fedak@sh.cvut.cz mailto:jack@mobil.cz
Linux - the ultimate NT Service Pack.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: erroneous completion when using {}
2000-06-27 15:55 erroneous completion when using {} Jan Fedak
@ 2000-06-27 16:11 ` Andrej Borsenkow
0 siblings, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 2000-06-27 16:11 UTC (permalink / raw)
To: Jan Fedak, Zsh workers
>
> Hello.
>
> 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\
>
> That is wrong and my glob pattern won't succeed later.
>
> Jan
>
> P.S. And my version: 3.1.6-dev-20, I use the new completion system.
>
Something like this happens in current CVS version (3.1.9-dev-1 +
patches).
bor@itsrm2% ls -1
a 1
a 2
a 3
bor@itsrm2% ls $PWD/{a\ 1,<CURSOR>a\ 2
(no blank between `,' and `a') after TAB
bor@itsrm2% ls $PWD/{a 1,a\ 2,
TAB once more
bor@itsrm2% ls $PWD/{a 1,a\ 2,
Completing `file'
The completion just after braces work:
bor@itsrm2% ls $PWD/{<TAB>
bor@itsrm2% ls $PWD/{a\ 1
Completing file
a\ 1 a\ 2 a\ 3
a-a-m-c
bor@itsrm2% ls $PWD/{a\ 1,a\ 2
Completing file
a\ 1 a\ 2 a\ 3
-andrej
P.S. curly braces are not glob pattern ...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: erroneous completion when using {}
@ 2000-06-28 9:22 Sven Wischnowsky
0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2000-06-28 9:22 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-06-28 9:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-27 15:55 erroneous completion when using {} Jan Fedak
2000-06-27 16:11 ` Andrej Borsenkow
2000-06-28 9:22 Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).