about summary refs log tree commit diff
path: root/_nq
blob: a5b86b69eb04b814a55685e76e106200dcec77b1 (plain) (blame)
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 "$@"