From 4d995160e42e875c714263d210df714160d200d4 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 23 Aug 2016 23:15:39 +0000 Subject: 39094: _git-config: When an option is unknown, complete its value to the set value. --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bba59595a..c661cafe3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-08-24 Daniel Shahaf + + * 39094: Completion/Unix/Command/_git: _git-config: When an + option is unknown, complete its value to the set value. + 2016-08-23 Jun-ichi Takimoto * 39087: Src/builtin.c, Src/utils.c: fix 'conditionally diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 304d6eb59..a9c0cc8d2 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2597,7 +2597,7 @@ _git-config () { # 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 @@ -2606,7 +2606,7 @@ _git-config () { continue fi else - git_options+="${key}:unknown option name" + git_options+="${key}:unknown option name::->unknown" fi done } @@ -3207,6 +3207,10 @@ _git-config () { 'values:value:(user)' \ 'umasks: :__git_guard_number umask' && ret=0 ;; + (unknown) + _message "$line[1] option value" + compadd - $current && ret=0 + ;; esac ;; (*) -- cgit 1.4.1