Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion
- X-seq: zsh-workers 7450
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: completion
- Date: Thu, 19 Aug 1999 15:59:26 +0200 (MET DST)
- In-reply-to: Sven Wischnowsky's message of Thu, 19 Aug 1999 12:44:34 +0200 (MET DST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Some minor tweaks and fixes... I forgot to give the explanations
string built to compadd in some places and the action string from the
description should be substituted when used (in _long_options and
_arguments).
Bye
Sven
diff -u -r oc/Base/_arguments Completion/Base/_arguments
--- oc/Base/_arguments Thu Aug 19 13:24:26 1999
+++ Completion/Base/_arguments Thu Aug 19 15:57:53 1999
@@ -372,13 +372,13 @@
# If the action starts with a space, we just call it.
- $=action
+ ${(e)=~action}
else
# Otherwise we call it with the description-arguments built above.
action=( $=action )
- "$action[1]" "$expl[@]" "${(@)action[2,-1]}"
+ ${(e)action[1]} "$expl[@]" ${(e)~action[2,-1]}
fi
fi
diff -u -r oc/Base/_long_options Completion/Base/_long_options
--- oc/Base/_long_options Thu Aug 19 13:24:26 1999
+++ Completion/Base/_long_options Thu Aug 19 15:57:08 1999
@@ -260,10 +260,10 @@
compadd "$expl[@]" - ${=action[2,-2]}
elif (( $#action )); then
if [[ "$action" = \ * ]]; then
- $=action
+ ${(e)=~action}
else
action=($=action)
- $action[1] "$expl[@]" $action[2,-1]
+ ${(e)action[1]} "$expl[@]" ${(e)~action[2,-1]}
fi
fi
@@ -310,10 +310,10 @@
if [[ "$parta[1]" = (\[|\() ]]; then
compadd "$expl[@]" - ${=parta[2,-2]}
elif [[ "$parta" = \ * ]]; then
- $=parta
+ ${(e)=~parta}
else
action=($=parta)
- $action[1] "$expl[@]" $action[2,-1]
+ ${(e)~parta[1]} "$expl[@]" ${(e)~action[2,-1]}
fi
else
compadd -S '' - "$PREFIX"
diff -u -r oc/Base/_subscript Completion/Base/_subscript
--- oc/Base/_subscript Thu Aug 19 13:24:26 1999
+++ Completion/Base/_subscript Thu Aug 19 15:51:50 1999
@@ -4,8 +4,8 @@
if [[ "$PREFIX" = :* ]]; then
_description expl 'character class'
- compadd -p: -S ':]' alnum alpha blank cntrl digit graph lower print punct \
- space upper xdigit
+ compadd "$expl[@]" -p: -S ':]' alnum alpha blank cntrl digit graph \
+ lower print punct space upper xdigit
elif [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then
_description expl 'association key'
if [[ "$RBUFFER" = \]* ]]; then
diff -u -r oc/Builtins/_zmodload Completion/Builtins/_zmodload
--- oc/Builtins/_zmodload Thu Aug 19 13:24:30 1999
+++ Completion/Builtins/_zmodload Thu Aug 19 15:52:17 1999
@@ -7,8 +7,8 @@
compgen "$expl[@]" -B
elif [[ "$fl" = -*u* ]]; then
_description expl module
- compadd - $(zmodload)
+ compadd "$expl[@]" - $(zmodload)
else
_description expl 'module file'
- compadd - ${^module_path}/*(N:t:r)
+ compadd "$expl[@]" - ${^module_path}/*(N:t:r)
fi
diff -u -r oc/User/_gdb Completion/User/_gdb
--- oc/User/_gdb Thu Aug 19 13:24:40 1999
+++ Completion/User/_gdb Thu Aug 19 15:47:59 1999
@@ -52,6 +52,6 @@
return ret
else
_description expl executable
- _files -/g '*(*)'
+ _files "$expl[@]" -/g '*(*)'
fi
fi
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author