about summary refs log tree commit diff
path: root/_fq
blob: 27269b93cef7a4618bd4b7a251c4a0a80fbf53b4 (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 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 "$@"