summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-08-08 20:10:44 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-08-08 20:10:44 +0200
commit13f22f5df6164ed231a879778b0b9c472a316736 (patch)
tree026939784e05e53881725477074dbe71e2a648c7 /etc
parent3e5423f927d329a66d849258acfa22ef5f9f7332 (diff)
Added fan completion
Diffstat (limited to 'etc')
-rw-r--r--etc/completions/_fan20
1 files changed, 20 insertions, 0 deletions
diff --git a/etc/completions/_fan b/etc/completions/_fan
new file mode 100644
index 0000000..ca74639
--- /dev/null
+++ b/etc/completions/_fan
@@ -0,0 +1,20 @@
+#compdef fan
+## vim:ft=zsh
+## fan completion
+## Daniel Friesel <derf@derf.homelinux.org>
+## https://derf.homelinux.org/~derf/dotfiles/zsh/completions/_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
+}