Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] make: return true if we added completions
- X-seq: zsh-workers 28998
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: [PATCH] make: return true if we added completions
- Date: Fri, 15 Apr 2011 00:34:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:x-mailer; bh=uWpvrI8R7qZgdlzgSnH4/ufaYzWYcsIDhTrAeEtdka8=; b=XA2uuGBnO4Q1nKAtlkFhdHITSOT+6Yd4+N6XoOHbDomsiMCbw1ETZ4QoAOCtTer96z 7dhrghnEu5merot5snct87oYQjg7F9gytG0du3i5NPyNfgdXeCsL6pBrlQw7apr4D/HR Ljvfz7/+7+dywmlmbsS/tHip1ROYUI3aj9iho=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer; b=SZMytNHVIZx+YaA9eKfu6JWMfpRUv5/6wasq6E/Y1DSHB4gPd6KGHAd99egT0cioYh PW2tessoUmIjpnxcMQMv11lUNZutIVZ3+QudbYXwaXsZRs+PRrzz8PT6nhQyOX6UVmeo Wd8CuVcwV0N7dmlcKubZNNVpUScF9q2750D2Q=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Does this look right?
---
Completion/Unix/Command/_make | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index e404d16..1e62c0d 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
--
1.7.4-rc1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author