From 7ca26fcadc34720920256d66bbea068ca66db2ad Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 3 Mar 2009 17:24:05 +0100 Subject: Prettied up Start/Stop/... --- etc/function | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/etc/function b/etc/function index 7775757..9629d98 100644 --- a/etc/function +++ b/etc/function @@ -10,15 +10,9 @@ for funcfile in $ZDIR/functions/*(*N); autoload ${funcfile:t} unset funcfile -# Convenient control over system daemons -# The functions are uppercase to avoid conflicts -# from https://git.tabularazor.org/~mikael/etc/tree/zsh/functions -for action in Start Stop Restart Reload; { - eval "function $action { - typeset action - for action in \$*; { - sudo /etc/init.d/\$action ${action:l} - } - }" +function Start Stop Restart Reload { + typeset action + for action in $*; { + sudo /etc/init.d/$1 ${0:l} + } } -unset action -- cgit v1.2.3