From ed8602ee3f7f7082503e6f8fa71853199e61db31 Mon Sep 17 00:00:00 2001 From: Alexandre Rames Date: Thu, 4 Sep 2014 15:28:11 +0100 Subject: 33108: stgit --patch completion --- ChangeLog | 3 +++ Completion/Unix/Command/_stgit | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index c900eaa42..74a3a8a80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-09-04 Peter Stephenson + * Alexandre Rames: 33108: Completion/Unix/Command/_stgit: + --patch completion. + * 33091: Doc/Zsh/builtins.yo: improve documentation for ttyctl. 2014-09-03 Barton E. Schaefer 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 ;; -- cgit 1.4.1