zsh-workers
 help / color / mirror / Atom feed
* [PATCH 2/4] _git-config: Fix a bug where a second trailing dot would be incorrectly offered.
  2020-06-26 18:06 [PATCH 1/4] _git-config: Complete some more options Daniel Shahaf
@ 2020-06-26 18:06 ` Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2020-06-26 18:06 UTC (permalink / raw)
  To: zsh-workers

---
 Completion/Unix/Command/_git | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 87551a17d..e860a5063 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -3025,11 +3025,7 @@ __git_config_option-or-value () {
         local opt
         declare -a match mbegin mend
         for opt in ${${${${(M)git_options:#(#i)${IPREFIX}[^.:]##:*}#(#i)${IPREFIX}}/#(#b)([^:]##:)([^\\:]#(\\?[^\\:]#)#:[^\\:]#(\\?[^\\:]#)#:->bool)/$match[1]whether or not to $match[2]}/#(#b)([^:]##:([^\\:]#(\\?[^\\:]#)#))*/$match[1]}; do
-          # TODO: Completing the option names 'core.splitIndex' or 'grep.column'
-          #       offers a second, trailing dot, because there are also options
-          #       called 'splitIndex.foo' and 'column.bar' (some of them are
-          #       added to $git_options as "unknown option name").
-          if (( ${git_options[(I)${opt%%:*}.*]} )); then
+          if (( ${git_options[(I)${IPREFIX}${opt%%:*}.*]} )); then
             sections_and_options+=$opt
           else
             options+=$opt

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-26 18:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 18:06 [PATCH 1/4] _git-config: Complete some more options Daniel Shahaf
2020-06-26 18:06 ` [PATCH 2/4] _git-config: Fix a bug where a second trailing dot would be incorrectly offered Daniel Shahaf

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git