about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2011-04-15 09:57:40 +0000
committerMikael Magnusson <mikachu@gmail.com>2011-04-15 09:57:40 +0000
commit2c6c147bd362d0afa2220cb4505b0af3025f9b21 (patch)
treee85dc6b0616a94131c11703f1edde78ad60759b2 /Completion/Unix
parent7657ea65dcebc6585e583b8295004e9cda5431ae (diff)
downloadzsh-2c6c147bd362d0afa2220cb4505b0af3025f9b21.tar.gz
zsh-2c6c147bd362d0afa2220cb4505b0af3025f9b21.tar.xz
zsh-2c6c147bd362d0afa2220cb4505b0af3025f9b21.zip
28998: use correct return status in _make
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_make13
1 files changed, 8 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index e404d162d..1e62c0d2d 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -5,6 +5,7 @@
 
 local prev="$words[CURRENT-1]" file expl tmp is_gnu dir incl match
 local -A TARGETS VARIABLES
+local ret=1
 
 expandVars() {
   local open close var val front ret tmp=$1
@@ -159,10 +160,10 @@ fi
 
 if [[ "$prev" == -[CI] ]]
 then
-  _files -W ${(q)$(findBasedir ${words[1,CURRENT-1]})} -/
+  _files -W ${(q)$(findBasedir ${words[1,CURRENT-1]})} -/ && ret=0
 elif [[ "$prev" == -[foW] ]]
 then
-  _files -W ${(q)$(findBasedir $words)}
+  _files -W ${(q)$(findBasedir $words)} && ret=0
 else
   file="$words[(I)-f]"
   if (( file ))
@@ -208,15 +209,17 @@ else
     # Complete make variable as if shell variable
     compstate[parameter]="${PREFIX%%\=*}"
     compset -P 1 '*='
-    _value "$@"
+    _value "$@" && ret=0
   else
     _tags targets variables
     while _tags
     do
       _requested targets expl 'make targets' \
-        compadd -- ${(k)TARGETS}
+        compadd -- ${(k)TARGETS} && ret=0
       _requested variables expl 'make variables' \
-        compadd -S '=' -- ${(k)VARIABLES}
+        compadd -S '=' -- ${(k)VARIABLES} && ret=0
     done
   fi
 fi
+
+return ret