completion: make stash -p and alias for stash push -p
[git/git.git] / contrib / completion / git-completion.bash
index 9a95b3b..adb6516 100644 (file)
@@ -2776,6 +2776,9 @@ _git_stash ()
        local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
        local subcommands='push list show apply clear drop pop create branch'
        local subcommand="$(__git_find_on_cmdline "$subcommands save")"
+       if [ -n "$(__git_find_on_cmdline "-p")" ]; then
+               subcommand="push"
+       fi
        if [ -z "$subcommand" ]; then
                case "$cur" in
                --*)