From ff0e5cf27e08a1dab2e79708704d52fb4f86f777 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 9 Nov 2008 22:01:08 +0100 Subject: start/stop/... functions: Allow multiple arguments --- etc/function | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'etc') 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 -- cgit v1.2.3