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

PATCH: compdef exit value



Use of && rather than if-then was causing compdef to return a nonzero exit
status in some cases when it should not have.  The first two hunks are just
stray whitespace.

Index: Completion/compinit
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Completion/compinit,v
retrieving revision 1.3
diff -c -r1.3 compinit
--- Completion/compinit	2001/05/30 15:57:36	1.3
+++ Completion/compinit	2001/06/21 08:30:52
@@ -221,7 +221,7 @@
     echo "$0: I needs arguments"
     return 1
   fi
-  
+
   while getopts "anpPkKd" opt; do
     case "$opt" in
     a)    autol=yes;;
@@ -251,7 +251,7 @@
     echo "$0: I needs arguments"
     return 1
   fi
-  
+
   if [[ -z "$delete" ]]; then
     # If the first word contains an equal sign, all words must contain one
     # and we define which services to use for the commands.
@@ -360,7 +360,7 @@
         fi
         if [[ -z "$new" || "${+_comps[$i]}" -eq 0 ]]; then
           _comps[$cmd]="$func"
-	  [[ -n "$svc" ]] && _services[$cmd]="${i#*\=}"
+	  if [[ -n "$svc" ]]; then _services[$cmd]="${i#*\=}"; fi
 	fi
       done
       ;;

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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