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

Re: PATCH: tag aliases



Just a small simplification in _loop.


Bye
 Sven

diff -ru ../z.old/Completion/Core/_loop Completion/Core/_loop
--- ../z.old/Completion/Core/_loop	Wed Mar 22 14:23:27 2000
+++ Completion/Core/_loop	Wed Mar 22 15:33:22 2000
@@ -11,11 +11,11 @@
   shift
 fi
 
-tmp=${argv[4,-1][(i)-]}
-if [[ tmp -lt ${#}-3 ]]; then
-  pre=( "${(@)argv[4,tmp+2]}" )
-  suf=( "${(@)argv[tmp+3,-1]}" )
-elif [[ tmp -eq ${#}-3 ]]; then
+tmp=${argv[(ib:4:)-]}
+if [[ tmp -lt $# ]]; then
+  pre=( "${(@)argv[4,tmp-1]}" )
+  suf=( "${(@)argv[tmp,-1]}" )
+elif [[ tmp -eq $# ]]; then
   pre=( "${(@)argv[4,-2]}" )
   suf=()
 else

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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