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

Re: completion with prefix which contains meta character.



I wrote:

> ...
> 
> Still, here is the patch for _main_complete, the state this leaves the 
> code in will stay valid independent of the answer for the questions
> above.

Thought too late about looking at other uses of compset. Sorry.

Bye
 Sven

diff -ru ../z.old/Completion/Builtins/_hash Completion/Builtins/_hash
--- ../z.old/Completion/Builtins/_hash	Fri Jan  7 11:33:27 2000
+++ Completion/Builtins/_hash	Fri Jan  7 11:44:01 2000
@@ -3,13 +3,13 @@
 local expl
 
 if [[ "$words[2]" = -*d* ]]; then
-  if compset -P 1 '*\='; then
+  if compset -P 1 '*='; then
     _wanted -C -d-value files && _path_files -g '*(-/)'
   else
     _wanted -C -d named-directories expl 'named directory' &&
         compadd "$expl[@]" -q -S '=' - "${(@k)nameddirs}"
   fi
-elif compset -P 1 '*\='; then
+elif compset -P 1 '*='; then
   _wanted -C value values expl 'executable file' &&
       _files "$expl[@]" -g '*(*)'
 else
diff -ru ../z.old/Completion/Linux/_rpm Completion/Linux/_rpm
--- ../z.old/Completion/Linux/_rpm	Fri Jan  7 11:33:35 2000
+++ Completion/Linux/_rpm	Fri Jan  7 11:45:53 2000
@@ -202,7 +202,7 @@
   tags)
     if compset -P '*\{'; then
       _wanted tags expl 'RPM tag' &&
-          compadd "$expl[@]" -M 'm:{a-z}={A-Z}' -S '}' - \
+          compadd "$expl[@]" -M 'm:{a-z}={A-Z}' -S '\}' - \
                   "${(@)${(@f)$(rpm --querytags)}#RPMTAG_}" && ret=0
     else
       _message 'RPM format'
@@ -212,7 +212,7 @@
     _message 'RPM capability'
     ;;
   relocate)
-    if compset -P '*\='; then
+    if compset -P '*='; then
       _description directories expl 'new path'
     else
       _description directories expl 'old path'
diff -ru ../z.old/Completion/User/_dd Completion/User/_dd
--- ../z.old/Completion/User/_dd	Fri Jan  7 11:33:36 2000
+++ Completion/User/_dd	Fri Jan  7 11:46:17 2000
@@ -2,17 +2,17 @@
 
 local expl
 
-if compset -P 1 'conv\='; then
+if compset -P 1 'conv='; then
   # If there's a comma present, ignore up to the last one.  The
   # test alone will have that effect.
   compset -p '*,'
   _wanted values expl conversion &&
       compadd "$expl[@]" -qS, -q \
               ascii ebcdic ibm block unblock lcase ucase swab noerror sync
-elif compset -P 1 'if\='; then
+elif compset -P 1 'if='; then
   _description files expl 'input file'
   _files "$expl[@]"
-elif compset -P 1 'of\='; then
+elif compset -P 1 'of='; then
   _description files expl 'output file'
   _files "$expl[@]"
 else
diff -ru ../z.old/Completion/User/_gs Completion/User/_gs
--- ../z.old/Completion/User/_gs	Fri Jan  7 11:33:37 2000
+++ Completion/User/_gs	Fri Jan  7 11:46:34 2000
@@ -32,7 +32,7 @@
     fi
     ;;
   sname)
-    if compset -P '*\='; then
+    if compset -P '*='; then
       case "$IPREFIX" in
       *DEVICE\=)
         _wanted devices expl 'ghostscript device' &&
diff -ru ../z.old/Completion/User/_make Completion/User/_make
--- ../z.old/Completion/User/_make	Fri Jan  7 11:33:37 2000
+++ Completion/User/_make	Fri Jan  7 11:46:47 2000
@@ -24,5 +24,5 @@
  	      /^\.include  *<bsd\.port\.(subdir\.|pre\.)?mk>/ || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.)?mk"/ {
  	        print "fetch fetch-list extract patch configure build install reinstall deinstall package describe checkpatch checksum makesum" }' \
  	     FS=: $file) && ret=0
-  (( ret )) && { compset -P 1 '*\='; _files }
+  (( ret )) && { compset -P 1 '*='; _files }
 fi

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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