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 --- Completion/Unix/Command/_stgit | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Completion') 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