summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-06-21 09:24:39 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-06-21 09:24:39 +0000
commitf256c16efe7c7d078e95f57a9546aeefadf4607f (patch)
treeb63d3295ba97cf1f6505385963dfb5ec1727d530 /Completion
parente8cb280d503d882554cbf1c02373bea32c8c2960 (diff)
downloadzsh-f256c16efe7c7d078e95f57a9546aeefadf4607f.tar.gz
zsh-f256c16efe7c7d078e95f57a9546aeefadf4607f.tar.xz
zsh-f256c16efe7c7d078e95f57a9546aeefadf4607f.zip
Fix exit status of compdef.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/compinit6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/compinit b/Completion/compinit
index 4b85be764..bd879b11c 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -221,7 +221,7 @@ compdef() {
     echo "$0: I needs arguments"
     return 1
   fi
-  
+
   while getopts "anpPkKd" opt; do
     case "$opt" in
     a)    autol=yes;;
@@ -251,7 +251,7 @@ compdef() {
     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 @@ compdef() {
         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
       ;;