#compdef nq nqtail nqterm _nq_job() { compadd "$@" -- ${NQDIR:-.}/,*.*(:t) } _nq() { case "$service" in nqtail) _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' ;; nqterm) _arguments : \ '(-):command name: _command_names -e' \ '*::arguments:_normal' ;; esac } _nq "$@"