summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-13 22:15:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-13 22:15:27 (GMT)
commit15fc1c02fce2ee6a8a3f625bf24dd782fd905904 (patch)
tree51f5ba1e438f17516615e06ff031103660918541 /contrib
parente636799b4d6a6a8abad151697eae27044bb8e95b (diff)
parentcaf1899699b2255111a3db335553e31f3718c1c9 (diff)
downloadgit-15fc1c02fce2ee6a8a3f625bf24dd782fd905904.zip
git-15fc1c02fce2ee6a8a3f625bf24dd782fd905904.tar.gz
git-15fc1c02fce2ee6a8a3f625bf24dd782fd905904.tar.bz2
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')
-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 27332ed..84a256e 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
}