git-commit-vandalism/contrib/completion
SZEDER Gábor 7d5ecd775d completion: list paths and refs for 'git worktree add'
Complete paths after 'git worktree add <TAB>' and refs after 'git
worktree add -b <TAB>' and 'git worktree add some/dir <TAB>'.

Uncharacteristically for a Git command, 'git worktree add' takes a
mandatory path parameter before a commit-ish as its optional last
parameter.  In addition, it has both standalone --options and options
with a mandatory unstuck parameter ('-b <new-branch>').  Consequently,
trying to complete refs for that last optional commit-ish parameter
resulted in a more convoluted than usual completion function, but
hopefully all the included comments will make it not too hard to
digest.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-01-15 14:06:13 -08:00
..
.gitattributes completion: mark bash script as LF-only 2017-05-10 13:32:51 +09:00
git-completion.bash completion: list paths and refs for 'git worktree add' 2020-01-15 14:06:13 -08:00
git-completion.tcsh git-completion.tcsh: fix redirect with noclobber 2015-06-09 11:21:15 -07:00
git-completion.zsh completion: clarify installation instruction for zsh 2019-10-18 13:55:49 +09:00
git-prompt.sh git-prompt: improve cherry-pick/revert detection 2019-07-01 12:39:44 -07:00