aboutsummaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash13
1 files changed, 10 insertions, 3 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 73abea31b4..a8e7c6ddbf 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -13,7 +13,8 @@
# *) git email aliases for git-send-email
# *) tree paths within 'ref:path/to/file' expressions
# *) file paths within current working directory and index
-# *) common --long-options
+# *) common --long-options but not single-letter options
+# *) arguments to long and single-letter options
#
# To use these routines:
#
@@ -3464,7 +3465,7 @@ _git_sparse_checkout ()
_git_stash ()
{
- local subcommands='push list show apply clear drop pop create branch'
+ local subcommands='push list show apply clear drop pop create branch import export'
local subcommand="$(__git_find_on_cmdline "$subcommands save")"
if [ -z "$subcommand" ]; then
@@ -3490,6 +3491,9 @@ _git_stash ()
show,--*)
__gitcomp_builtin stash_show "$__git_diff_common_options"
;;
+ export,--*)
+ __gitcomp_builtin stash_export "--print --to-ref"
+ ;;
*,--*)
__gitcomp_builtin "stash_$subcommand"
;;
@@ -3501,7 +3505,10 @@ _git_stash ()
| sed -n -e 's/:.*//p')"
fi
;;
- show,*|apply,*|drop,*|pop,*)
+ import,*)
+ __git_complete_refs
+ ;;
+ show,*|apply,*|drop,*|pop,*|export,*)
__gitcomp_nl "$(__git stash list \
| sed -n -e 's/:.*//p')"
;;