diff options
-rw-r--r-- | README.md | 7 | ||||
-rwxr-xr-x | tq | 2 |
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 |