diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/completion/git-completion.bash | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 265842712e..49a03c314e 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1371,7 +1371,7 @@ _git_show_branch () _git_stash () { - local subcommands='save list show apply clear drop pop create' + local subcommands='save list show apply clear drop pop create branch' local subcommand="$(__git_find_subcommand "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" @@ -1381,6 +1381,16 @@ _git_stash () save,--*) __gitcomp "--keep-index" ;; + apply,--*) + __gitcomp "--index" + ;; + show,--*|apply,--*|drop,--*|pop,--*|branch,--*) + COMPREPLY=() + ;; + show,*|apply,*|drop,*|pop,*|branch,*) + __gitcomp "$(git --git-dir="$(__gitdir)" stash list \ + | sed -n -e 's/:.*//p')" + ;; *) COMPREPLY=() ;; |