summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_stgit11
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c900eaa42..74a3a8a80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2014-09-04 Peter Stephenson <p.stephenson@samsung.com>
+ * Alexandre Rames: 33108: Completion/Unix/Command/_stgit:
+ --patch completion.
+
* 33091: Doc/Zsh/builtins.yo: improve documentation for ttyctl.
2014-09-03 Barton E. Schaefer <schaefer@zsh.org>
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
;;