1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-30 00:56:08 +02:00

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
This commit is contained in:
Junio C Hamano 2021-05-07 12:47:42 +09:00
commit 70a890d42f

View File

@ -3250,9 +3250,10 @@ _git_whatchanged ()
__git_complete_worktree_paths ()
{
local IFS=$'\n'
# Generate completion reply from worktree list skipping the first
# entry: it's the path of the main worktree, which can't be moved,
# removed, locked, etc.
__gitcomp_nl "$(git worktree list --porcelain |
# Skip the first entry: it's the path of the main worktree,
# which can't be moved, removed, locked, etc.
sed -n -e '2,$ s/^worktree //p')"
}