1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-16 12:21:18 +02:00

33108: stgit --patch completion

This commit is contained in:
Alexandre Rames 2014-09-04 15:28:11 +01:00 committed by Peter Stephenson
parent 2bff41d1f6
commit ed8602ee3f
2 changed files with 14 additions and 0 deletions

View file

@ -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>

View file

@ -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
;;