mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
42364: _git: fix __git_ignore_line to ignore the current word
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".
This commit is contained in:
parent
5b946f6c4d
commit
1142e2dedb
2 changed files with 6 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2018-02-22 Daniel Hahler <zsh@thequod.de>
|
||||
|
||||
* 42364: Completion/Unix/Command/_git: _git: fix __git_ignore_line to
|
||||
ignore the current word.
|
||||
|
||||
2018-02-17 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 42362: Src/jobs.c: protet REPORTTIME logic from bad status.
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue