diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-18 13:32:41 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-18 13:32:41 +0200 |
commit | 4eb2c736f048fbecd1e6ef6865ec8447bfed9c73 (patch) | |
tree | 808494a8b0064c6d240601b84ab112b7bd06bb8b | |
parent | 6c1da49ae4ec33228262366d6d0437a5d38555e0 (diff) | |
download | nq-4eb2c736f048fbecd1e6ef6865ec8447bfed9c73.tar.gz nq-4eb2c736f048fbecd1e6ef6865ec8447bfed9c73.tar.xz nq-4eb2c736f048fbecd1e6ef6865ec8447bfed9c73.zip |
add zsh completion
-rw-r--r-- | _fq | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/_fq b/_fq new file mode 100644 index 0000000..27269b9 --- /dev/null +++ b/_fq @@ -0,0 +1,27 @@ +#compdef nq tq fq + +_nq_job() { + compadd "$@" -- ${NQDIR:-.}/,*.*(:t) +} + +_nq() { + case "$service" in + fq) _arguments -s -A : \ + '-q[show only one line per job]' \ + '-a[output for all jobs]' \ + '*::job:_nq_job' + ;; + nq) _arguments -A : \ + '-w[wait for jobs]:*:job:_nq_job' \ + '-t[check jobs]:*:job:_nq_job' \ + '(-):command name: _command_names -e' \ + '*::arguments:_normal' + ;; + tq) _arguments : \ + '(-):command name: _command_names -e' \ + '*::arguments:_normal' + ;; + esac +} + +_nq "$@" |