zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: completion cleanup
Date: Tue, 2 May 2000 10:22:06 +0200 (MET DST)	[thread overview]
Message-ID: <200005020822.KAA29656@beta.informatik.hu-berlin.de> (raw)


Here is the result of the promised going-through-the-completion-functions.

There were indeed some more calls to _wanted with a "$expl[@]", not
only in _hash.

Bye
 Sven

Index: Completion/Base/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_arguments,v
retrieving revision 1.7
diff -u -r1.7 _arguments
--- Completion/Base/_arguments	2000/04/27 12:07:35	1.7
+++ Completion/Base/_arguments	2000/05/02 08:20:04
@@ -298,14 +298,15 @@
 	
         if comparguments -s single; then
 
-          _description options expl option
-
           if [[ "$single" = direct ]]; then
-	    compadd "$expl[@]" -QS '' - "${PREFIX}${SUFFIX}"
+            _all_labels options expl option \
+	        compadd -QS '' - "${PREFIX}${SUFFIX}"
           elif [[ "$single" = next ]]; then
-	    compadd "$expl[@]" -Q - "${PREFIX}${SUFFIX}"
+            _all_labels options expl option \
+	        compadd -Q - "${PREFIX}${SUFFIX}"
           elif [[ "$single" = equal ]]; then
-	    compadd "$expl[@]" -QqS= - "${PREFIX}${SUFFIX}"
+            _all_labels options expl option \
+	        compadd -QqS= - "${PREFIX}${SUFFIX}"
           else
 	    tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" )
 	    tmp3=( "${(M@)tmp1:#[-+]?[^:]*}" )
Index: Completion/Base/_first
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_first,v
retrieving revision 1.3
diff -u -r1.3 _first
--- Completion/Base/_first	2000/05/02 08:18:54	1.3
+++ Completion/Base/_first	2000/05/02 08:20:04
@@ -33,7 +33,7 @@
 #           opt=-V
 #         fi
 #         if _wanted "$opt" history-words expl "history ($n)" \
-#                compadd "$expl[@]" -Q - \
+#                compadd -Q - \
 #                    "${(@)${(@)historywords:#[\$'\"]*}[1,i*10]}"; then
 #           # We have found at least one matching word, so we switch
 #           # on menu-completion and make sure that no other
Index: Completion/Builtins/_hash
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Builtins/_hash,v
retrieving revision 1.2
diff -u -r1.2 _hash
--- Completion/Builtins/_hash	2000/04/11 07:57:56	1.2
+++ Completion/Builtins/_hash	2000/05/02 08:20:04
@@ -10,7 +10,7 @@
         compadd -q -S '=' - "${(@k)nameddirs}"
   fi
 elif compset -P 1 '*='; then
-  _wanted -C value values expl 'executable file' _files "$expl[@]" -g '*(-*)'
+  _wanted -C value values expl 'executable file' _files -g '*(-*)'
 else
   _wanted -C name commands expl command compadd -q -S '=' - "${(@k)commands}"
 fi
Index: Completion/Core/_expand
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_expand,v
retrieving revision 1.5
diff -u -r1.5 _expand
--- Completion/Core/_expand	2000/05/01 18:14:08	1.5
+++ Completion/Core/_expand	2000/05/02 08:20:04
@@ -94,10 +94,8 @@
 else
   _tags all-expansions expansions original
 
-  if _requested all-expansions; then
-    _description all-expansions expl 'all expansions'
-    compadd "$expl[@]" -UQ -qS "$suf" - "$exp"
-  fi
+  _requested all-expansions expl 'all expansions' &&
+      compadd "$expl[@]" -UQ -qS "$suf" - "$exp"
 
   if [[ $#exp -gt 1 ]] && _requested expansions; then
     local i normal dir
Index: Completion/User/_gprof
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_gprof,v
retrieving revision 1.2
diff -u -r1.2 _gprof
--- Completion/User/_gprof	2000/04/11 07:57:57	1.2
+++ Completion/User/_gprof	2000/05/02 08:20:04
@@ -49,7 +49,7 @@
       expl=function
     fi
     _wanted functions expl "$expl" \
-        compadd "$expl[@]" -M 'r:|_=* r:|=*' - "$_gprof_funcs[@]" && ret=0
+        compadd -M 'r:|_=* r:|=*' - "$_gprof_funcs[@]" && ret=0
   else
     return 1
   fi
Index: Completion/User/_mount
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_mount,v
retrieving revision 1.3
diff -u -r1.3 _mount
--- Completion/User/_mount	2000/04/11 07:57:57	1.3
+++ Completion/User/_mount	2000/05/02 08:20:05
@@ -540,7 +540,7 @@
   compset -P '*,'
 
   _wanted types expl 'file system type' \
-      compadd "$expl[@]" -qS, -M 'L:|no=' - "$fss[@]" && ret=0
+      compadd -qS, -M 'L:|no=' - "$fss[@]" && ret=0
   ;;
 fsopt)
   _tags options || return 1
Index: Completion/User/_socket
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_socket,v
retrieving revision 1.2
diff -u -r1.2 _socket
--- Completion/User/_socket	2000/04/11 07:57:57	1.2
+++ Completion/User/_socket	2000/05/02 08:20:05
@@ -11,8 +11,7 @@
 [[ $CURRENT -eq 2 ]] &&
     { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
       [[ "$PREFIX" = -* ]] } &&
-    _wanted options expl option \
-        compadd -M 'r:|[_-]=* r:|=*' "$expl[@]" - -version
+    _wanted options expl option compadd - -version
 
 _arguments -C -s \
   '-b[background]' \
Index: Completion/User/_urls
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_urls,v
retrieving revision 1.5
diff -u -r1.5 _urls
--- Completion/User/_urls	2000/04/27 09:24:38	1.5
+++ Completion/User/_urls	2000/05/02 08:20:05
@@ -104,7 +104,7 @@
         while _next_label files expl 'bookmark'; do
           _path_files -W "$urls_path/$scheme" "$expl[@]" -S '' -g '*(^/)' && 
               ret=0
-          _path_files -W "$urls_path/$scheme" -S/ -r '/' -/ && ret=0
+          _path_files -W "$urls_path/$scheme" "$expl[@]" -S/ -r '/' -/ && ret=0
         done
 	(( ret )) || return 0
       done

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


             reply	other threads:[~2000-05-02  8:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02  8:22 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-11-03  8:04 Sven Wischnowsky
1999-11-03 10:07 ` Bart Schaefer
1999-11-01  7:50 Sven Wischnowsky
1999-11-02 17:44 ` Bart Schaefer
1999-10-29 13:01 Sven Wischnowsky
1999-10-29 12:51 Sven Wischnowsky
1999-10-29 19:45 ` Clint Adams

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=200005020822.KAA29656@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).