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

38962: _git-config: Document more line noise.

This commit is contained in:
Daniel Shahaf 2016-07-29 17:00:05 +00:00
parent 8d71a610af
commit 774f654e36
2 changed files with 8 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2016-07-31 Daniel Shahaf <d.s@daniel.shahaf.name>
* 38962: Completion/Unix/Command/_git: _git-config: Document
more line noise.
* 38959: Doc/Zsh/compsys.yo: Document 38956 (_widgets).
2016-07-29 Daniel Shahaf <d.s@daniel.shahaf.name>

View file

@ -2701,11 +2701,16 @@ _git-config () {
;;
esac
local z=$'\0'
# Set $parts to the $git_options_static element that corresponds to $line[1]
# (the option name whose value is currently being completed). The elements
# of $parts are the colon-separated elements of the $git_options_static element.
declare -a parts
parts=("${(S@0)${git_options_static[(r)(#i)${line[1]}:*]}//(#b)(*[^\\]|):/$match[1]$z}")
if (( $#parts < 2 )) && [[ $line[1] == [^.]##.*.[^.]## ]]; then
parts=("${(S@0)${git_options_static[(r)(#i)${line[1]%%.*}.\*.${line[1]##*.}:*]}//(#b)(*[^\\]|):/$match[1]$z}")
fi
(( $#parts >= 4 )) || return ret
case $parts[4] in
('->'*)