completion: fix __git_complete_worktree_paths
Use __git to invoke "worktree list" in __git_complete_worktree_paths, to respect any "-C" and "--git-dir" options present on the command line. Signed-off-by: Rubén Justo <rjusto@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3c2a3fdc38
commit
3574816d98
@ -3571,7 +3571,7 @@ __git_complete_worktree_paths ()
|
||||
# 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 |
|
||||
__gitcomp_nl "$(__git worktree list --porcelain |
|
||||
sed -n -e '2,$ s/^worktree //p')"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user