File: _nq

package info (click to toggle)
nq 1.0-0.2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 152 kB
  • sloc: ansic: 539; sh: 169; makefile: 28
file content (27 lines) | stat: -rw-r--r-- 520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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 "$@"