completion: use __gitcomp_builtin in _git_rm
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 9 Feb 2018 11:02:16 +0000 (18:02 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Feb 2018 18:24:53 +0000 (10:24 -0800)
No new completable options!

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rm.c
contrib/completion/git-completion.bash
index 6e0c7f5ac653d949a240c7f0689f7516fc99d3b4..a818efe230a0667b9e3e5f03efbb11b1db1df273 100644 (file)
@@ -242,7 +242,7 @@ static struct option builtin_rm_options[] = {
        OPT__DRY_RUN(&show_only, N_("dry run")),
        OPT__QUIET(&quiet, N_("do not list removed files")),
        OPT_BOOL( 0 , "cached",         &index_only, N_("only remove from the index")),
-       OPT__FORCE(&force, N_("override the up-to-date check"), 0),
+       OPT__FORCE(&force, N_("override the up-to-date check"), PARSE_OPT_NOCOMPLETE),
        OPT_BOOL('r', NULL,             &recursive,  N_("allow recursive removal")),
        OPT_BOOL( 0 , "ignore-unmatch", &ignore_unmatch,
                                N_("exit with a zero status even if nothing matched")),
index e63f2f2741d84cc50dff7dd032b7d60c9e73ad17..30a51c5015ec85b8cbdc81e2d7b4af444bacdc17 100644 (file)
@@ -2715,7 +2715,7 @@ _git_rm ()
 {
        case "$cur" in
        --*)
-               __gitcomp "--cached --dry-run --ignore-unmatch --quiet"
+               __gitcomp_builtin rm
                return
                ;;
        esac