about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-10 12:08:28 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-10 12:08:28 +0200
commitdafba4fe7102df3a123b33b95b69cb2577e39cc3 (patch)
tree01e9b983b2389f1c2f95ccd0e839413b63ec59a5
parent968f620a131010857f7bf84cf338835bbe91fcc0 (diff)
downloadnq-dafba4fe7102df3a123b33b95b69cb2577e39cc3.tar.gz
nq-dafba4fe7102df3a123b33b95b69cb2577e39cc3.tar.xz
nq-dafba4fe7102df3a123b33b95b69cb2577e39cc3.zip
tq: use fq.
-rw-r--r--README.md7
-rwxr-xr-xtq2
2 files changed, 4 insertions, 5 deletions
diff --git a/README.md b/README.md
index 6acf859..364477c 100644
--- a/README.md
+++ b/README.md
@@ -53,10 +53,7 @@ lock files produced, so you should clean them regularly.
 
 ## nq helpers
 
-Two helper scripts are provided:
-
-`tq` wraps `nq` and displays the output in a new tmux window (it needs
-`tmux` and GNU `tail`).
+Two helper programs are provided:
 
 `fq` outputs the log of the currently running jobs, exiting when the
 jobs are done.  If no job is running, the output of the last job is
@@ -65,6 +62,8 @@ line per job.  `fq` uses `inotify` on Linux and falls back to polling
 for size change else.  `fq.sh` is a similar tool, not quite as robust,
 implemented as shell-script calling `tail`.
 
+`tq` wraps `nq` and displays the `fq` output in a new tmux window.
+
 (A pure shell implementation of `nq` is provided as `nq.sh`.  It needs
 `flock` from util-linux, and only has a timer resolution of 1s.
 Lock files from `nq` and `nq.sh` should not be mixed.)
diff --git a/tq b/tq
index 1a8bbeb..882a8b8 100755
--- a/tq
+++ b/tq
@@ -11,7 +11,7 @@ printf '%s\n' "$s"
 if [ -n "$p" ] && [ -n "$TMUX" ]; then
 	tmux new-window -a -d -n '<' -c '#{pane_current_path}' \
 		"trap true INT QUIT TERM EXIT;
-		 tail -F --pid=$p $s || kill $p;
+		 fq $s || kill $p;
 		 printf '[%d exited, ^D to exit.]\n' $p;
 		 cat >/dev/null"
 fi