diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-18 15:04:38 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-18 15:04:38 +0100 |
commit | bf1177d83e948afe8f23ae04fda222d1bbf94ace (patch) | |
tree | 7b8285133f98122b6a0e8f7be112b23c2146580a /etc/completions/_off | |
parent | 799bfea483be1f56df926d89f6f94af76c544c26 (diff) |
off: Added zsh completion
Diffstat (limited to 'etc/completions/_off')
-rw-r--r-- | etc/completions/_off | 21 |
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 |