mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
28998: use correct return status in _make
This commit is contained in:
parent
7657ea65dc
commit
2c6c147bd3
2 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-04-15 Mikael Magnusson <mikachu@gmail.com>
|
||||
|
||||
* 28998: Completion/Unix/Command/_make: set return status
|
||||
correctly.
|
||||
|
||||
2011-04-14 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 28997: configure.ac, Src/system.h: make --enable-libc-musl
|
||||
|
@ -14451,5 +14456,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5247 $
|
||||
* $Revision: 1.5248 $
|
||||
*****************************************************
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue