* [PATCH] _git-config: When an option is unknown, complete its value to the set value.
@ 2016-08-23 23:15 Daniel Shahaf
0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2016-08-23 23:15 UTC (permalink / raw)
To: zsh-workers
---
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
;;
(*)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-23 23:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 23:15 [PATCH] _git-config: When an option is unknown, complete its value to the set value Daniel Shahaf
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).