summaryrefslogtreecommitdiff
path: root/etc/completions/_fan
blob: c5d595bbb71fc1be0c4fa5109543c8e454acb31e (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/zsh/completions/_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
}