summary refs log tree commit diff
path: root/_nq
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-09-20 18:46:56 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-09-20 18:47:04 +0200
commitf86734dea265022375416ca770e240d19a5bf584 (patch)
tree8e9957c516d96b1fcc07f6a88f7ba923d38201d1 /_nq
parentb0e9190cda2d95ac57f05edd53bbfce8342cb7e1 (diff)
downloadnq-f86734dea265022375416ca770e240d19a5bf584.tar.gz
nq-f86734dea265022375416ca770e240d19a5bf584.tar.xz
nq-f86734dea265022375416ca770e240d19a5bf584.zip
_fq: rename to _nq for consistency.
Diffstat (limited to '_nq')
-rw-r--r--_nq27
1 files changed, 27 insertions, 0 deletions
diff --git a/_nq b/_nq
new file mode 100644
index 0000000..27269b9
--- /dev/null
+++ b/_nq
@@ -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 "$@"