Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _git-config: When an option is unknown, complete its value to the set value.
- X-seq: zsh-workers 39094
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _git-config: When an option is unknown, complete its value to the set value.
- Date: Tue, 23 Aug 2016 23:15:39 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=bY/wxVgfXqBwQ3HXvrfRhxvm8eA=; b=KIV8M4 cmONLEZ8srrIpfSMt74adJOgW+yz7UYxWRnI+4cpLoKPp2zNOGAVuc8XaHVtFug2 o1HjPiG/abP9OxRBTV+s3uUPP5+bdnHw1JoepvVIx5QB/BF7P00BAU3n5sMHE8ze u0z2bkhI3B/byLtvbDpEMn8fE5cP79ShoxQKg=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=bY/wxVgfXqBwQ3HXvrfRhxvm8e A=; b=aqMcQBjqasyT+s2D5/N1DYYcPTc8aOp06Pw4xyRhZyDlZ+8oZ8fwrdHEUR UQsDxvTiXussT8L1Oi5B71Zjp8sglyaUYgrhvljZBln08mMGShWdm0p3QWvk1jIt D7w7KlGwueu0DuI0HfYyLIjVOQK60GzxMQBUelm0R5Xf9gv8Q=
- 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
---
Completion/Unix/Command/_git | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 5b64dda..1108087 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2621,7 +2621,7 @@ __git_config_option-or-value () {
# If $key isn't an instance of a known foo.*.bar:baz $git_options entry...
if ! (( ${+git_options[(r)(#i)${(b)key%%.*}.[*].${(b)key##*.}:*]} )); then
# ... then add it.
- git_options+="${key}:unknown option name"
+ git_options+="${key}:unknown option name::->unknown"
fi
else
# $key is of the form "foo.bar" where 'foo' is known
@@ -2630,7 +2630,7 @@ __git_config_option-or-value () {
continue
fi
else
- git_options+="${key}:unknown option name"
+ git_options+="${key}:unknown option name::->unknown"
fi
done
}
@@ -3231,6 +3231,10 @@ __git_config_option-or-value () {
'values:value:(user)' \
'umasks: :__git_guard_number umask' && ret=0
;;
+ (unknown)
+ _message "$line[1] option value"
+ compadd - $current && ret=0
+ ;;
esac
;;
(*)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author