From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21926 invoked from network); 19 Aug 1999 13:59:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Aug 1999 13:59:40 -0000 Received: (qmail 17400 invoked by alias); 19 Aug 1999 13:59:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7450 Received: (qmail 17392 invoked from network); 19 Aug 1999 13:59:29 -0000 Date: Thu, 19 Aug 1999 15:59:26 +0200 (MET DST) Message-Id: <199908191359.PAA00688@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Thu, 19 Aug 1999 12:44:34 +0200 (MET DST) Subject: Re: PATCH: completion 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@informatik.hu-berlin.de