## vim:ft=zsh # zsh functions autoload -U compinit autoload catch throw autoload zargs # own functions for funcfile in $ZDIR/functions/*(*N); autoload ${funcfile:t} unset funcfile function Start Stop Restart Reload { typeset script function __sudo { if ((EUID)) { sudo $* } else { $* } } for script in $*; { __sudo /etc/init.d/$script ${0:l} } }