summaryrefslogtreecommitdiff
path: root/etc/function
blob: a0f63c3865b87e4dfb2f3c0619517b47c2958619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## vim:ft=zsh
zrc_status functions

# zsh functions
autoload -U compinit
autoload catch throw
autoload zargs

# own functions
autoload $ZDIR/functions/*(*N:t)

function Start Stop Restart Reload {
	typeset script
	function __sudo {
		if ((EUID)) {
			sudo $*
		} else {
			$*
		}
	}
	for script in $*; {
		__sudo /etc/init.d/$script ${0:l}
	}
}