From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22169 invoked by alias); 29 Jul 2016 17:00:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38962 Received: (qmail 17831 invoked from network); 29 Jul 2016 17:00:23 -0000 X-Qmail-Scanner-Diagnostics: from hermes.apache.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(140.211.11.3):SA:0(-1.3/5.0):. Processed in 0.246606 secs); 29 Jul 2016 17:00:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at apache.org does not designate permitted sender hosts) From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 1/4] _git-config: Document more line noise. Date: Fri, 29 Jul 2016 17:00:05 +0000 Message-Id: <1469811608-3870-1-git-send-email-danielsh@tarsus.local2> X-Mailer: git-send-email 2.1.4 --- 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 ('->'*)