diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-09 18:01:59 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 10:24:51 -0800 |
commit | caf2de33905b74a52a0df26214ee9ab555b32bd9 (patch) | |
tree | 11278531c32f517e9fba8466afd04c11dd62d6ff /builtin | |
parent | 7e1eeaa431047d7f71bcaad53f579a405bca41c8 (diff) | |
download | git-caf2de33905b74a52a0df26214ee9ab555b32bd9.tar.gz |
completion: use __gitcomp_builtin in _git_grep
The new completable options are:
--after-context=
--before-context=
--color
--context
--exclude-standard
--quiet
--recurse-submodules
--textconv
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 3ca4ac80d8..496f33336e 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -832,8 +832,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix) OPT_BOOL('L', "files-without-match", &opt.unmatch_name_only, N_("show only the names of files without match")), - OPT_BOOL('z', "null", &opt.null_following_name, - N_("print NUL after filenames")), + OPT_BOOL_F('z', "null", &opt.null_following_name, + N_("print NUL after filenames"), + PARSE_OPT_NOCOMPLETE), OPT_BOOL('c', "count", &opt.count, N_("show the number of matches instead of matching lines")), OPT__COLOR(&opt.color, N_("highlight matches")), @@ -884,9 +885,11 @@ int cmd_grep(int argc, const char **argv, const char *prefix) OPT_GROUP(""), { OPTION_STRING, 'O', "open-files-in-pager", &show_in_pager, N_("pager"), N_("show matching files in the pager"), - PARSE_OPT_OPTARG, NULL, (intptr_t)default_pager }, - OPT_BOOL(0, "ext-grep", &external_grep_allowed__ignored, - N_("allow calling of grep(1) (ignored by this build)")), + PARSE_OPT_OPTARG | PARSE_OPT_NOCOMPLETE, + NULL, (intptr_t)default_pager }, + OPT_BOOL_F(0, "ext-grep", &external_grep_allowed__ignored, + N_("allow calling of grep(1) (ignored by this build)"), + PARSE_OPT_NOCOMPLETE), OPT_END() }; |