about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--_fq27
1 files changed, 27 insertions, 0 deletions
diff --git a/_fq b/_fq
new file mode 100644
index 0000000..27269b9
--- /dev/null
+++ b/_fq
@@ -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 "$@"