summaryrefslogtreecommitdiff
path: root/etc/completions/_fan
blob: 81f28fdec4e16fffae544e16a7205e7755c62e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#compdef fan
## vim:ft=zsh
## fan completion
## Daniel Friesel <derf@derf.homelinux.org>
## https://derf.homelinux.org/~derf/dotfiles/completion/_fan
## see also: https://derf.homelinux.org/~derf/code/fan

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
}