Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: parameters in command position



I wrote:

> I forgot... now that user's can say that they don't want to see
> certain types of matches ...

Trying to make that a bit simpler... this allows values of the form
`!tag1 tag2 ...' in the tag-order style which make all other tags be
used.


Bye
 Sven

diff -ru ../z.old/Completion/Core/_tags Completion/Core/_tags
--- ../z.old/Completion/Core/_tags	Thu Jan  6 13:52:59 2000
+++ Completion/Core/_tags	Thu Jan  6 15:35:45 2000
@@ -48,6 +48,7 @@
       case $tag in
       -)     nodef=yes;;
       *\(\)) "${${tag%%[ 	]#\(\)}##[ 	]#}" "$@";;
+      \!*)   comptry "${(@)argv:#(${(j:|:)~${=tag[2,-1]}})}";;
       ?*)    comptry ${=tag};;
       esac
     done
diff -ru ../z.old/Doc/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- ../z.old/Doc/Zsh/compsys.yo	Thu Jan  6 13:52:39 2000
+++ Doc/Zsh/compsys.yo	Thu Jan  6 15:38:36 2000
@@ -1140,9 +1140,12 @@
 specifies that, when completing arguments of the command tt(gunzip),
 files generated by patterns (in this case, those ending in tt(.gz)) and
 any directories will be presented first, and if that fails, any other files
-will be tried.  If any string in the value consists of only a hyphen
+will be tried.  A string starting with an exclamation mark (`tt(!)')
+specifies names of tags that are not to be used -- the effect will be
+the same as if all other possible tags for the context had been
+listed.  If any string in the value consists of only a hyphen
 (`tt(-)'), then only the tags selected by the other strings will be
-generated. Normally all tags not explicitly selected will be tried at
+generated.  Normally all tags not explicitly selected will be tried at
 the end if the selected tags did not generate any matches.  This means 
 that a value of only one hyphen turns off completion in a particular
 context.

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author