summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-07-13 15:15:27 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-07-13 15:15:27 -0700
commit15fc1c02fce2ee6a8a3f625bf24dd782fd905904 (patch)
tree51f5ba1e438f17516615e06ff031103660918541 /contrib/completion
parentMerge branch 'jc/report-tracking' (diff)
parentDocumentation: tweak use case in "git stash save --keep-index" (diff)
downloadtgif-15fc1c02fce2ee6a8a3f625bf24dd782fd905904.tar.xz
Merge branch 'sg/stash-k-i'
* sg/stash-k-i: Documentation: tweak use case in "git stash save --keep-index" stash: introduce 'stash save --keep-index' option
Diffstat (limited to 'contrib/completion')
-rwxr-xr-xcontrib/completion/git-completion.bash13
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 27332ed8b1..84a256ec54 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1163,8 +1163,19 @@ _git_show ()
_git_stash ()
{
local subcommands='save list show apply clear drop pop create'
- if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
+ local subcommand="$(__git_find_subcommand "$subcommands")"
+ if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
+ else
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$subcommand,$cur" in
+ save,--*)
+ __gitcomp "--keep-index"
+ ;;
+ *)
+ COMPREPLY=()
+ ;;
+ esac
fi
}