1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 22:32:12 +02:00

41552: complete only branches after git worktree add --detach

the --detach is superfluous for other commits
This commit is contained in:
Oliver Kiddle 2017-08-16 23:40:57 +02:00
parent ddb8675901
commit f80fe2dfe9
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2017-08-16 Oliver Kiddle <opk@zsh.org>
* 41552: Completion/Unix/Command/_git: complete only branches
after git worktree add --detach because the --detach is
superfluous for other commits
2017-08-15 Peter Stephenson <p.w.stephenson@ntlworld.com>
* posted twice but has not shown up: Src/exec.c, Src/zsh.h:

View file

@ -2027,9 +2027,9 @@ _git-worktree() {
case $line[1] in
(add)
if (( $words[(I)--detach] )); then
args=( ':commit:__git_commits' )
else
args=( ':branch:__git_branch_names' )
else
args=( ':commit:__git_commits' )
fi
_arguments \
'(-f --force)'{-f,--force}'[checkout branch even if already checked out in another worktree]' \