Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: compinit and _zftp
- X-seq: zsh-workers 6016
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: compinit and _zftp
- Date: Tue, 13 Apr 1999 13:45:55 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
compdef -k and -p weren't working in autoloaded functions, and I spotted a
mistake in the first argument of zftp.
pws-15 should appear real soon now. I haven't included the optimisation of
${..#..} and ${..%..} yet, do people think this is slow enough to need the
special cases?
--- Completion/Builtins/_zftp.old Tue Apr 13 09:37:39 1999
+++ Completion/Builtins/_zftp Tue Apr 13 13:42:06 1999
@@ -10,7 +10,7 @@
local subcom
if [[ $words[1] = zftp ]]; then
- if [[ $CURRENT -eq 1 ]]; then
+ if [[ $CURRENT -eq 2 ]]; then
compadd open params user login type ascii binary mode put \
putat get getat append appendat ls dir local remote mkdir rmdir
return
--- Completion/Core/compinit.old Tue Apr 13 10:32:16 1999
+++ Completion/Core/compinit Tue Apr 13 13:38:39 1999
@@ -273,11 +273,11 @@
_i_tag=$_i_line[1]
shift _i_line
if [[ $_i_tag = '#compdef' ]]; then
- case $_i_line[2] in
- -p) compdef -pa "${_i_file:t}" "${_i_line[@]}";;
- -k) compdef -ka "${_i_file:t}" "${_i_line[@]}";;
- *) compdef -na "${_i_file:t}" "${_i_line[@]}";;
- esac
+ if [[ $_i_line[1] = -[pk] ]]; then
+ compdef ${_i_line[1]}a "${_i_file:t}" "${(@)_i_line[2,-1]}"
+ else
+ compdef -na "${_i_file:t}" "${_i_line[@]}"
+ fi
elif [[ $_i_tag = '#autoload' ]]; then
autoload ${_i_file:t}
fi
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author