summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorAlexandre Rames <alexandre@uop.re>2014-09-04 15:28:11 +0100
committerPeter Stephenson <pws@zsh.org>2014-09-04 15:48:49 +0100
commited8602ee3f7f7082503e6f8fa71853199e61db31 (patch)
tree7d5f6602b094ee0ea217f426649c5d6bb93d61ca /Completion/Unix/Command
parent2bff41d1f67a757962c7f1db5223ee676d10e7f5 (diff)
downloadzsh-ed8602ee3f7f7082503e6f8fa71853199e61db31.tar.gz
zsh-ed8602ee3f7f7082503e6f8fa71853199e61db31.zip
33108: stgit --patch completion
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_stgit11
1 files changed, 11 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_stgit b/Completion/Unix/Command/_stgit
index b2f2aeafa..6248267eb 100644
--- a/Completion/Unix/Command/_stgit
+++ b/Completion/Unix/Command/_stgit
@@ -32,6 +32,17 @@ else
compadd $(stg series --noprefix 2> /dev/null) \
&& ret=0
;;
+ (ref*)
+ last_word="$words[$CURRENT-1]"
+ refresh_patch_options=( -p --patch )
+ if [[ -n ${refresh_patch_options[(r)$last_word]} ]]; then
+ _wanted -V "applied patches" expl "patch" \
+ compadd ${${(M)${(f)"$(stg series 2> /dev/null)"}##[+>] *}#[+>] } \
+ && ret=0
+ else
+ _files
+ fi
+ ;;
(*)
_files
;;