summaryrefslogtreecommitdiff
path: root/etc/completions/_fan
blob: 9549a351afca6b0d999ae2b455d635d15b87af8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#compdef fan
## vim:ft=zsh
## fan completion <https://derf.homelinux.org/~derf/code/fan>
## Copyright (C) 2008 by Daniel Friesel <derf@derf.homelinux.org>
## License: WTFPL <http://sam.zoy.org/wtfpl>

local arguments_thinkpad arguments_generic

arguments_thinkpad=(
	'::fan level:(low med high auto)'
)
arguments_generic=(
	':fan state:(on off)'
)

if [[ -w /proc/acpi/ibm/fan ]] {
	_arguments -s $arguments_thinkpad
} elif [[ -w /proc/acpi/fan/FAN/state ]] {
	_arguments -s $arguments_generic
}