提交 c72e0db1 编写于 作者: L Lee Marlow 提交者: Junio C Hamano

bash completion: Add completion for 'git grep'

Add completions for all long options specified in the docs

    --cached
    --text --ignore-case --word-regexp --invert-match
    --full-name
    --extended-regexp --basic-regexp --fixed-strings
    --files-with-matches --name-only
    --files-without-match
    --count
    --and --or --not --all-match
Signed-off-by: NLee Marlow <lee.marlow@gmail.com>
Acked-by: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 7d0b18a4
......@@ -791,6 +791,29 @@ _git_gc ()
COMPREPLY=()
}
_git_grep ()
{
__git_has_doubledash && return
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--*)
__gitcomp "
--cached
--text --ignore-case --word-regexp --invert-match
--full-name
--extended-regexp --basic-regexp --fixed-strings
--files-with-matches --name-only
--files-without-match
--count
--and --or --not --all-match
"
return
;;
esac
COMPREPLY=()
}
_git_help ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
......@@ -1482,6 +1505,7 @@ _git ()
fetch) _git_fetch ;;
format-patch) _git_format_patch ;;
gc) _git_gc ;;
grep) _git_grep ;;
help) _git_help ;;
log) _git_log ;;
ls-remote) _git_ls_remote ;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册