* [PATCH] [RFC] _git: fix __git_ignore_line to ignore the current word
@ 2018-02-14 0:29 Daniel Hahler
0 siblings, 0 replies; only message in thread
From: Daniel Hahler @ 2018-02-14 0:29 UTC (permalink / raw)
To: zsh-workers
From: Daniel Hahler <git@thequod.de>
Before this patch "git branch -d master<tab>" would result in
"no matches found", while "master" itself should get completed here.
The "(bQ)" (added in 527badc23, via 38129?!) does not seem to be necessary
anymore: with files "f\[a-z\]o" and "foo", "git add f[a-z]o <tab>"
offers "f\[a-z\]o", but not "foo".
---
Completion/Unix/Command/_git | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 9f0225fab..4df851c98 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5596,12 +5596,7 @@ __git_describe_commit () {
# .
(( $+functions[__git_ignore_line] )) ||
__git_ignore_line () {
- declare -a ignored
- ignored=()
- ((CURRENT > 1)) &&
- ignored+=(${(bQ)line[1,CURRENT-1]})
- ((CURRENT < $#line)) &&
- ignored+=(${(bQ)line[CURRENT+1,-1]})
+ local -a ignored=(${line:#${words[CURRENT]}})
$* -F ignored
}
--
2.16.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-14 0:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 0:29 [PATCH] [RFC] _git: fix __git_ignore_line to ignore the current word Daniel Hahler
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).