diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 215f8b2a6..c2f15f6a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2016-06-25 Daniel Shahaf <d.s@daniel.shahaf.name> + * unposted: Completion/Unix/Command/_git: _git-config: Document + some line noise. + * unposted: Completion/Unix/Command/_git: _git-config: Fix syntax error in 'tag.sort' completion. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 46e290788..5cc144963 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2371,7 +2371,9 @@ _git-config () { if compset -P '[^.]##.*.'; then declare -a match mbegin mend + # When completing 'remote.foo.<TAB>', offer 'bar' if $git_options_static contains 'remote.foo.bar'. options+=(${${${${(M)git_options_static:#(#i)${IPREFIX}[^.:]##:*}#(#i)${IPREFIX}}/#(#b)([^:]##:)([^\\:]#(\\?[^\\:]#)#:[^\\:]#(\\?[^\\:]#)#:->bool)/$match[1]whether or not to $match[2]}/#(#b)([^:]##:([^\\:]#(\\?[^\\:]#)#))*/$match[1]}) + # When completing 'remote.foo.<TAB>', offer 'bar' if $git_options_static contains 'remote.*.bar'. options+=(${${${${(M)git_options_static:#(#i)${IPREFIX%%.*}.\*.[^.:]##:*}#(#i)${IPREFIX%%.*}.\*.}/#(#b)([^:]##:)([^\\:]#(\\?[^\\:]#)#:[^\\:]#(\\?[^\\:]#)#:->bool)/$match[1]whether or not to $match[2]}/#(#b)([^:]##:([^\\:]#(\\?[^\\:]#)#))*/$match[1]}) declare -a labels @@ -2420,6 +2422,7 @@ _git-config () { 'gitcvs.ext:ext-connection-method-specific options' 'gitcvs.pserver:pserver-connection-method-specific options' 'notes.rewrite:commands to copy notes from original for when rewriting commits') + # Set $sections to the applicable subsection names (e.g., 'decorate:...' if $IPREFIX == "color.") sections+=(${${(M)subsections:#${IPREFIX}[^.:]##(.|):*}#${IPREFIX}}) # TODO: Is it fine to use functions like this before _describe below, |