X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Fcompletion%2Fgit-completion.bash;h=e3ddecc995eb30391639983d9f6f0db7567d7b9a;hb=3bb18e58fc4f5eddd97bc34fc11dc207b47cc093;hp=7cf855746832b7400f9923297c4a0170cfacce36;hpb=071b489682f68c5e205ed3af2a7fe997f1d7c467;p=git.git diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 7cf855746..e3ddecc99 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -958,6 +958,8 @@ __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff _git_difftool () { + __git_has_doubledash && return + local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --tool=*) @@ -965,11 +967,15 @@ _git_difftool () return ;; --*) - __gitcomp "--tool=" + __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex + --base --ours --theirs + --no-renames --diff-filter= --find-copies-harder + --relative --ignore-submodules + --tool=" return ;; esac - COMPREPLY=() + __git_complete_file } __git_fetch_options=" @@ -1069,7 +1075,8 @@ _git_grep () return ;; esac - COMPREPLY=() + + __gitcomp "$(__git_refs)" } _git_help () @@ -1322,8 +1329,18 @@ _git_rebase () fi __git_complete_strategy && return case "$cur" in + --whitespace=*) + __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" + return + ;; --*) - __gitcomp "--onto --merge --strategy --interactive" + __gitcomp " + --onto --merge --strategy --interactive + --preserve-merges --stat --no-stat + --committer-date-is-author-date --ignore-date + --ignore-whitespace --whitespace= + " + return esac __gitcomp "$(__git_refs)"