Message ID | pull.943.v2.git.1620059347674.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f2acf763e29a3696fef268a9e8dc421e807df7f2 |
Headers | show |
Series | [v2] work around zsh comment in __git_complete_worktree_paths | expand |
"Sardorbek Imomaliev via GitGitGadget" <gitgitgadget@gmail.com> writes: > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 49e76e9d08cd..73f9fcf493c4 100644 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -3268,9 +3268,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')" > } Makes sense. Thanks, will queue.
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 49e76e9d08cd..73f9fcf493c4 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3268,9 +3268,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')" }