Skip to content

Commit 70a890d

Browse files
committed
Merge branch 'si/zsh-complete-comment-fix'
Portability fix for command line completion script (in contrib/). * si/zsh-complete-comment-fix: work around zsh comment in __git_complete_worktree_paths
2 parents 18e1ba1 + f2acf76 commit 70a890d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3250,9 +3250,10 @@ _git_whatchanged ()
32503250
__git_complete_worktree_paths ()
32513251
{
32523252
local IFS=$'\n'
3253+
# Generate completion reply from worktree list skipping the first
3254+
# entry: it's the path of the main worktree, which can't be moved,
3255+
# removed, locked, etc.
32533256
__gitcomp_nl "$(git worktree list --porcelain |
3254-
# Skip the first entry: it's the path of the main worktree,
3255-
# which can't be moved, removed, locked, etc.
32563257
sed -n -e '2,$ s/^worktree //p')"
32573258
}
32583259

0 commit comments

Comments
 (0)