summaryrefslogtreecommitdiff
path: root/etc/function
blob: 77757575784a2e138d778a142bd93d018ef6ad0c (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

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

# own functions
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}
		}
	}"
}
unset action