| Server IP : 199.250.200.62 / Your IP : 216.73.217.89 Web Server : Apache System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : jasonp18 ( 1000) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/share/zsh/5.0.2/functions/ |
Upload File : |
#compdef stg
typeset -a subcmds
subcmds=( ${${${(M)${(f)"$(stg help 2> /dev/null)"}## *}# }/#(#b)([^[:space:]]##)[[:space:]]##(*)/$match[1]:$match[2]} )
local curcontext="$curcontext"
local subcmd
local ret=1
if (( CURRENT == 2 )); then
_describe -t commands 'stgit command' subcmds && ret=0
else
shift words
(( CURRENT-- ))
subcmd="$words[1]"
curcontext="${curcontext%:*}-${subcmd}:"
case $subcmd in
(push)
_wanted -V "unapplied patches" expl "patch" \
compadd ${${(M)${(f)"$(stg series 2> /dev/null)"}##- *}#- } \
&& ret=0
;;
(pop)
_wanted -V "applied patches" expl "patch" \
compadd ${${(M)${(f)"$(stg series 2> /dev/null)"}##[+>] *}#[+>] } \
&& ret=0
;;
(edit|files|goto|rename|log|float|delete|sink|mail|sync|show|pick|hide)
_wanted -V "patches" expl "patch" \
compadd $(stg series --noprefix 2> /dev/null) \
&& ret=0
;;
(*)
_files
;;
esac
fi
return ret