completion: use __gitcomp_builtin in _git_worktree
The new completable options for "worktree add" are: --checkout --guess-remote --lock --track Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
80eb51970d
commit
fc3d4e0cbe
|
@ -367,7 +367,7 @@ static int add(int ac, const char **av, const char *prefix)
|
||||||
struct option options[] = {
|
struct option options[] = {
|
||||||
OPT__FORCE(&opts.force,
|
OPT__FORCE(&opts.force,
|
||||||
N_("checkout <branch> even if already checked out in other worktree"),
|
N_("checkout <branch> even if already checked out in other worktree"),
|
||||||
0),
|
PARSE_OPT_NOCOMPLETE),
|
||||||
OPT_STRING('b', NULL, &opts.new_branch, N_("branch"),
|
OPT_STRING('b', NULL, &opts.new_branch, N_("branch"),
|
||||||
N_("create a new branch")),
|
N_("create a new branch")),
|
||||||
OPT_STRING('B', NULL, &new_branch_force, N_("branch"),
|
OPT_STRING('B', NULL, &new_branch_force, N_("branch"),
|
||||||
|
|
|
@ -3021,16 +3021,16 @@ _git_worktree ()
|
||||||
else
|
else
|
||||||
case "$subcommand,$cur" in
|
case "$subcommand,$cur" in
|
||||||
add,--*)
|
add,--*)
|
||||||
__gitcomp "--detach"
|
__gitcomp_builtin worktree_add
|
||||||
;;
|
;;
|
||||||
list,--*)
|
list,--*)
|
||||||
__gitcomp "--porcelain"
|
__gitcomp_builtin worktree_list
|
||||||
;;
|
;;
|
||||||
lock,--*)
|
lock,--*)
|
||||||
__gitcomp "--reason"
|
__gitcomp_builtin worktree_lock
|
||||||
;;
|
;;
|
||||||
prune,--*)
|
prune,--*)
|
||||||
__gitcomp "--dry-run --expire --verbose"
|
__gitcomp_builtin worktree_prune
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue