about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-06-03 11:40:54 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-06-25 16:33:33 +0000
commit3bd8abc40bf9c218e1ddd23bfd804422b0684c0a (patch)
treed459c8420320f00e7648e4ffc4dbde75c5989288
parent59bf331d27ea29902870daeb50a47c13788fa7a7 (diff)
downloadzsh-3bd8abc40bf9c218e1ddd23bfd804422b0684c0a.tar.gz
zsh-3bd8abc40bf9c218e1ddd23bfd804422b0684c0a.tar.xz
zsh-3bd8abc40bf9c218e1ddd23bfd804422b0684c0a.zip
unposted: _git-config: Document some line noise.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git3
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,