zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: parameters in command position
@ 2000-01-06 12:52 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-01-06 12:52 UTC (permalink / raw)
  To: zsh-workers


I forgot... now that user's can say that they don't want to see
certain types of matches we probably should complete parameters in
command position, too. Maybe the auto-suffix should be `=(' for arrays 
and hashes.

This also removes the comment from _parameter because looking at
_parameters will tell you nothing about -e any more.

Bye
 Sven

diff -ru ../z.old/Completion/Base/_command_names Completion/Base/_command_names
--- ../z.old/Completion/Base/_command_names	Thu Jan  6 13:27:35 2000
+++ Completion/Base/_command_names	Thu Jan  6 13:42:55 2000
@@ -22,6 +22,7 @@
     'aliases:alias:compadd - ${(@k)aliases}'
     'reserved-words:reserved word:compadd - ${(@k)reswords}'
     'jobs:: _jobs -t'
+    'parameters:: _parameters -qS= -r "\n\t\- =["'
   )
 fi
 
diff -ru ../z.old/Completion/Base/_parameter Completion/Base/_parameter
--- ../z.old/Completion/Base/_parameter	Thu Jan  6 13:27:35 2000
+++ Completion/Base/_parameter	Thu Jan  6 13:48:11 2000
@@ -1,12 +1,3 @@
 #compdef -parameter-
 
 _tags parameters && _parameters -e
-
-# Without the `-e' option, we would use the following (see the file
-# Core/_parameters for more enlightenment).
-
-# if [[ "$compstate[insert]" = *menu* ]]; then
-#   _parameters -s ''
-# else
-#   _parameters -s ' '
-# fi

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: parameters in command position
@ 2000-01-06 14:40 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-01-06 14:40 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-01-06 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06 12:52 PATCH: parameters in command position Sven Wischnowsky
2000-01-06 14:40 Sven Wischnowsky

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).