zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/4] _git-config: Document more line noise.
@ 2016-07-29 17:00 Daniel Shahaf
  2016-07-29 17:00 ` [PATCH 2/4] _git-config: No functional change: rename $git_options_static to $git_options in preparation for the after-next commit Daniel Shahaf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Shahaf @ 2016-07-29 17:00 UTC (permalink / raw)
  To: zsh-workers

---
 Completion/Unix/Command/_git | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 71ced84..1952cb6 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -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
         ('->'*)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-29 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-29 17:00 [PATCH 1/4] _git-config: Document more line noise Daniel Shahaf
2016-07-29 17:00 ` [PATCH 2/4] _git-config: No functional change: rename $git_options_static to $git_options in preparation for the after-next commit Daniel Shahaf
2016-07-29 17:00 ` [PATCH 3/4] _git-config: Run gettable-options earlier and in all codepaths Daniel Shahaf
2016-07-29 17:00 ` [PATCH 4/4] _git-config: Complete option names present in the config file Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).