Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
cd completion does not work in CVS version (unsafe word splitting in _alternative).
- X-seq: zsh-workers 9145
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: cd completion does not work in CVS version (unsafe word splitting in _alternative).
- Date: Thu, 23 Dec 1999 17:58:21 +0300
- Importance: Normal
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
With fresh CVS ... (actually, it was the reason I fetched CVS - it did not work
in patched pws-12 as well) cd into $cdpath does not work. I tracked it down to:
+_alternative:62> action=( _path_files -W \(/home/bor /home/bor/src /tools/src
/archive/sni/dbase\) -/ )
+_alternative:63> _path_files -J -default- -W (/home/bor /home/bor/src
/tools/src/archive/sni/dbase) -/
+
The relevant lines in _alternative are:
action=( $=action )
${(e)action[1]} "$subopts[@]" "$expl[@]" "${(@e)~action[2,-1]}"
In other words, _every_ action with SP in argument is doomed because it is
splitted in multiple arguments. This is a general problem.
In case of _cd this results from:
_alternative \
'local-directories:local directories:_path_files -/' \
"path-directories: directories in cdpath:_path_files -W
\\(${${(@)cdpath:#.}}\\) -/"
I don't see, why should we exclude `.'. If it is in cdpath and user requested
path-directories - why not?
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author