completion: add git stash push
authorThomas Gummerer <t.gummerer@gmail.com>
Tue, 16 May 2017 19:59:45 +0000 (20:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 May 2017 03:15:56 +0000 (12:15 +0900)
When introducing git stash push in f5727e26e4 ("stash: introduce push
verb", 2017-02-19), I forgot to add it to the completion code. Add it
now.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
index 21016bf8dfe87572fb53a05488ba05bb3c08ed97..5ce23a238555b9d3b9610468e3e055763201c6ac 100644 (file)
@@ -2507,7 +2507,7 @@ _git_show_branch ()
 _git_stash ()
 {
        local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
-       local subcommands='save list show apply clear drop pop create branch'
+       local subcommands='push save list show apply clear drop pop create branch'
        local subcommand="$(__git_find_on_cmdline "$subcommands")"
        if [ -z "$subcommand" ]; then
                case "$cur" in
@@ -2522,6 +2522,9 @@ _git_stash ()
                esac
        else
                case "$subcommand,$cur" in
+               push,--*)
+                       __gitcomp "$save_opts --message"
+                       ;;
                save,--*)
                        __gitcomp "$save_opts"
                        ;;