summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-02-18 15:04:38 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-02-18 15:04:38 +0100
commitbf1177d83e948afe8f23ae04fda222d1bbf94ace (patch)
tree7b8285133f98122b6a0e8f7be112b23c2146580a /etc
parent799bfea483be1f56df926d89f6f94af76c544c26 (diff)
off: Added zsh completion
Diffstat (limited to 'etc')
-rw-r--r--etc/completions/_off21
1 files changed, 21 insertions, 0 deletions
diff --git a/etc/completions/_off b/etc/completions/_off
new file mode 100644
index 0000000..afe95fc
--- /dev/null
+++ b/etc/completions/_off
@@ -0,0 +1,21 @@
+#compdef off
+
+typeset -a arguments
+typeset expl
+
+arguments=(
+ '--force[shutdown a server]'
+ '-n[simulate]'
+ '-r[reboot]'
+ ':place:_off_places'
+)
+
+function _off_places {
+ if [[ ! -d ~/packages/places ]] {
+ return 1
+ }
+ _wanted place expl place \
+ compadd $(ls -1 ~/packages/places/etc)
+}
+
+_arguments -s $arguments