completion: use __gitcomp_builtin in _git_clean
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 9 Feb 2018 11:01:50 +0000 (18:01 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Feb 2018 18:24:50 +0000 (10:24 -0800)
The new completable options are --exclude and --interactive

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clean.c
contrib/completion/git-completion.bash
index 3c4ca9a2ff698253cc03228689068fc2884673bd..fad533a0a7382f10ecf48a738c955734ad5c0d96 100644 (file)
@@ -909,7 +909,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
        struct option options[] = {
                OPT__QUIET(&quiet, N_("do not print names of files removed")),
                OPT__DRY_RUN(&dry_run, N_("dry run")),
-               OPT__FORCE(&force, N_("force"), 0),
+               OPT__FORCE(&force, N_("force"), PARSE_OPT_NOCOMPLETE),
                OPT_BOOL('i', "interactive", &interactive, N_("interactive cleaning")),
                OPT_BOOL('d', NULL, &remove_directories,
                                N_("remove whole directories")),
index 068def9f6ba6e13ab9afd714306dc7473aaf2506..b7de381876411b8906e60ae455f8e53bd9a56031 100644 (file)
@@ -1307,7 +1307,7 @@ _git_clean ()
 {
        case "$cur" in
        --*)
-               __gitcomp "--dry-run --quiet"
+               __gitcomp_builtin clean
                return
                ;;
        esac