zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: completion
Date: Thu, 19 Aug 1999 15:59:26 +0200 (MET DST)	[thread overview]
Message-ID: <199908191359.PAA00688@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Thu, 19 Aug 1999 12:44:34 +0200 (MET DST)


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


             reply	other threads:[~1999-08-19 13:59 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-19 13:59 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21  9:50 Sven Wischnowsky
1999-10-28  8:12 Sven Wischnowsky
1999-10-28  6:58 Sven Wischnowsky
1999-10-27  8:42 Sven Wischnowsky
1999-10-27 16:39 ` Bart Schaefer
1999-10-27  7:14 Sven Wischnowsky
1999-10-27 21:26 ` Tanaka Akira
1999-10-26 13:17 Sven Wischnowsky
1999-10-26 13:01 Oliver Kiddle
1999-10-26 13:35 ` Zefram
1999-10-26 11:03 Sven Wischnowsky
1999-10-26 17:17 ` Bart Schaefer
1999-10-26 17:22 ` Tanaka Akira
1999-10-26 17:32   ` Tanaka Akira
1999-08-30  9:30 Sven Wischnowsky
1999-08-27  7:03 Sven Wischnowsky
1999-08-27  8:29 ` Tanaka Akira
1999-08-28  6:01   ` Tanaka Akira
1999-08-26 13:52 Sven Wischnowsky
1999-08-26 12:20 Sven Wischnowsky
1999-08-26 13:17 ` Tanaka Akira
1999-08-26 17:56 ` Tanaka Akira
1999-08-25 12:57 Sven Wischnowsky
1999-08-25 12:54 Sven Wischnowsky
1999-08-25  8:24 Sven Wischnowsky
1999-08-26 10:54 ` Tanaka Akira
1999-08-24 10:43 Sven Wischnowsky
1999-08-25  1:56 ` Tanaka Akira
1999-08-24  9:12 Sven Wischnowsky
1999-08-24 10:04 ` Tanaka Akira
1999-08-23 13:46 Sven Wischnowsky
1999-08-23 16:16 ` Tanaka Akira
1999-08-24 15:56 ` Tanaka Akira
1999-08-23 12:00 Sven Wischnowsky
1999-08-23  9:32 Sven Wischnowsky
1999-08-23 10:54 ` Tanaka Akira
1999-08-20 12:59 Sven Wischnowsky
1999-08-20 23:22 ` Tanaka Akira
1999-08-21  8:39   ` Tanaka Akira
1999-08-21 17:47     ` Tanaka Akira
1999-08-20  7:42 Sven Wischnowsky
1999-08-19 10:44 Sven Wischnowsky
1999-08-19 14:38 ` Tanaka Akira
1999-08-24 13:46 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908191359.PAA00688@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).