diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-13 15:15:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-13 15:15:27 -0700 |
commit | 15fc1c02fce2ee6a8a3f625bf24dd782fd905904 (patch) | |
tree | 51f5ba1e438f17516615e06ff031103660918541 /contrib/completion | |
parent | Merge branch 'jc/report-tracking' (diff) | |
parent | Documentation: tweak use case in "git stash save --keep-index" (diff) | |
download | tgif-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-x | contrib/completion/git-completion.bash | 13 |
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 } |