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

PATCH: Re: completion of ~ directories broken?



Adam Spiers wrote:

> [latest CVS]
> 
> % ls ~<TAB> 
> _all_labels:comptags:23: no tags registered
> 
> then it lists all users.  It doesn't seem to complete named
> directories either, but maybe I'm just missing a zstyle command for
> that.

Thinko, sorry. The missing named directories were caused by the same
bug.


Bye
 Sven

Index: Completion/Base/_tilde
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_tilde,v
retrieving revision 1.2
diff -u -r1.2 _tilde
--- Completion/Base/_tilde	2000/04/01 20:43:43	1.2
+++ Completion/Base/_tilde	2000/04/25 10:57:33
@@ -18,6 +18,7 @@
 
 while _tags; do
   _requested users && _users "$suf[@]" "$@" && ret=0
+
   _requested named-directories expl 'named directory' \
       compadd "$suf[@]" "$@" - "${(@k)nameddirs}"
 
Index: Completion/Core/_all_labels
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_all_labels,v
retrieving revision 1.2
diff -u -r1.2 _all_labels
--- Completion/Core/_all_labels	2000/04/11 07:57:56	1.2
+++ Completion/Core/_all_labels	2000/04/25 10:57:33
@@ -1,7 +1,12 @@
 #autoload
 
-local gopt=-J len tmp pre suf ret=1 descr spec
+local gopt=-J len tmp pre suf ret=1 descr spec prev
 
+if [[ "$1" = - ]]; then
+  prev=-
+  shift
+fi
+
 if [[ "$1" = -([12]|)[VJ] ]]; then
   gopt="$1"
   shift
@@ -20,7 +25,7 @@
   suf=5
 fi
 
-while comptags -A "$1" curtag spec; do
+while comptags "-A$prev" "$1" curtag spec; do
   _comp_tags="$_comp_tags $spec "
   if [[ "$curtag" = *:* ]]; then
     zformat -f descr "${curtag#*:}" "d:$3"
Index: Completion/Core/_requested
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_requested,v
retrieving revision 1.3
diff -u -r1.3 _requested
--- Completion/Core/_requested	2000/04/11 07:57:57	1.3
+++ Completion/Core/_requested	2000/04/25 10:57:33
@@ -9,7 +9,7 @@
 
 if comptags -R "$1"; then
   if [[ $# -gt 3 ]]; then
-    _all_labels "$gopt" "$@"
+    _all_labels - "$gopt" "$@"
   elif [[ $# -gt 1 ]]; then
     _description "$gopt" "$@"
   fi

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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