diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-09 22:01:08 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-09 22:01:58 +0100 |
commit | ff0e5cf27e08a1dab2e79708704d52fb4f86f777 (patch) | |
tree | a56de07775db6101dfb808f06114a5ec6af9761f /etc/function | |
parent | def54e82a10697dda633772b874724bd1fb600b8 (diff) |
start/stop/... functions: Allow multiple arguments
Diffstat (limited to 'etc/function')
-rw-r--r-- | etc/function | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/function b/etc/function index ecd9ea4..19e5ebd 100644 --- a/etc/function +++ b/etc/function @@ -16,5 +16,11 @@ chpwd # from https://git.tabularazor.org/~mikael/etc/tree/zsh/functions for action in Start Stop Restart Reload; { - eval "$action() { sudo /etc/init.d/\$1 ${action:l} ; }" + eval "function $action { + typeset action + for action in \$*; { + sudo /etc/init.d/\$action ${action:l} + } + }" } +unset action |