summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-03 17:24:05 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-03 17:24:05 +0100
commit7ca26fcadc34720920256d66bbea068ca66db2ad (patch)
treec89182fe999ec699990fae933b910e0fdbbaaf98 /etc
parent4bd5a5b17da25adf8115d506ad1ae5f02f751295 (diff)
Prettied up Start/Stop/...
Diffstat (limited to 'etc')
-rw-r--r--etc/function16
1 files 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