From 3bd8abc40bf9c218e1ddd23bfd804422b0684c0a Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 3 Jun 2016 11:40:54 +0000 Subject: unposted: _git-config: Document some line noise. --- Completion/Unix/Command/_git | 3 +++ 1 file changed, 3 insertions(+) (limited to '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.', 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.', 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, -- cgit 1.4.1