1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-08 12:01:21 +02:00

39094: _git-config: When an option is unknown, complete its value to the set value.

This commit is contained in:
Daniel Shahaf 2016-08-23 23:15:39 +00:00
parent acad0620ef
commit 4d995160e4
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2016-08-24 Daniel Shahaf <d.s@daniel.shahaf.name>
* 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 <takimoto-j@kba.biglobe.ne.jp> 2016-08-23 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 39087: Src/builtin.c, Src/utils.c: fix 'conditionally * 39087: Src/builtin.c, Src/utils.c: fix 'conditionally

View file

@ -2597,7 +2597,7 @@ _git-config () {
# If $key isn't an instance of a known foo.*.bar:baz $git_options entry... # 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 if ! (( ${+git_options[(r)(#i)${(b)key%%.*}.[*].${(b)key##*.}:*]} )); then
# ... then add it. # ... then add it.
git_options+="${key}:unknown option name" git_options+="${key}:unknown option name::->unknown"
fi fi
else else
# $key is of the form "foo.bar" where 'foo' is known # $key is of the form "foo.bar" where 'foo' is known
@ -2606,7 +2606,7 @@ _git-config () {
continue continue
fi fi
else else
git_options+="${key}:unknown option name" git_options+="${key}:unknown option name::->unknown"
fi fi
done done
} }
@ -3207,6 +3207,10 @@ _git-config () {
'values:value:(user)' \ 'values:value:(user)' \
'umasks: :__git_guard_number umask' && ret=0 'umasks: :__git_guard_number umask' && ret=0
;; ;;
(unknown)
_message "$line[1] option value"
compadd - $current && ret=0
;;
esac esac
;; ;;
(*) (*)