Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zcompsys space character problem
- X-seq: zsh-workers 17906
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Frank v Waveren <fvw@xxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: zcompsys space character problem
- Date: Tue, 5 Nov 2002 05:10:03 +0000
- In-reply-to: <1036465301GKC.fvw@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1036465301GKC.fvw@xxxxxxxxxxxxx>
This has something to do with `compfiles'. Comparing the _complete_debug
output for `ls a\ a/f' vs. `ls aa/f' shows (they're the same up to line
461 of _path_files):
: _path_files:461:for while; compfiles -r tmp1 a\ a/f
: _path_files:462:for while; tmp4=1
: _path_files:464:for while if; [[ a\ a/f == */* ]]
: _path_files:465:for while then; tmp2=a\ a
: _path_files:466:for while then; PREFIX=a\ a
: _path_files:467:for while then; SUFFIX=/f
: _path_files:478:for while if; (( tmp4 ))
: _path_files:486:for while then; tmp2=
: _path_files:487:for while then if; [[ -n ]]
: _path_files:489:for while then elif; [[ -n ]]
: _path_files:493:for while then else; compquote tmp1 tmp2
: _path_files:461:for while; compfiles -r tmp1 aa/f
: _path_files:462:for while; tmp4=0
: _path_files:464:for while if; [[ aa/f == */* ]]
: _path_files:465:for while then; tmp2=aa
: _path_files:466:for while then; PREFIX=aa
: _path_files:467:for while then; SUFFIX=/f
: _path_files:478:for while if; (( tmp4 ))
: _path_files:562:for while if; [[ aa/f != */* ]]
: _path_files:570:for while; testpath=aa/
: _path_files:572:for while; tmp3=f
Note how the code branches differently at line 478 because `compfiles'
fails at line 461 in the case with the space.
Changing line 461 from
compfiles -r tmp1 "$tmp3"
to
compfiles -r tmp1 "${(Q)tmp3}"
has the desired effect in this particular case, but I don't know if it is
always correct. Sven, are you out there?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author