Skip to content

Commit 61d15cd

Browse files
pcloudsgitster
authored andcommitted
completion: use __gitcomp_builtin in _git_mv
The new completable option is --verbose. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 4429d8b commit 61d15cd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

builtin/mv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
122122
struct option builtin_mv_options[] = {
123123
OPT__VERBOSE(&verbose, N_("be verbose")),
124124
OPT__DRY_RUN(&show_only, N_("dry run")),
125-
OPT__FORCE(&force, N_("force move/rename even if target exists"), 0),
125+
OPT__FORCE(&force, N_("force move/rename even if target exists"),
126+
PARSE_OPT_NOCOMPLETE),
126127
OPT_BOOL('k', NULL, &ignore_errors, N_("skip move/rename errors")),
127128
OPT_END(),
128129
};

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ _git_mv ()
18091809
{
18101810
case "$cur" in
18111811
--*)
1812-
__gitcomp "--dry-run"
1812+
__gitcomp_builtin mv
18131813
return
18141814
;;
18151815
esac

0 commit comments

Comments
 (0)