leahneukirchen/nq

Brainstorming some ideas for nq

tornaria opened this issue · 1 comments

Some half-cooked random ideas:

  1. Have a "tail -f" mode for fq which starts following output close to end. Useful because sometimes I have single jobs with outputs as long as 500k lines over ssh. I'm unsure if it should be the default or not (I think I'd muscle memory to be my default). Note fq | tail -f won't work for this, although it just occurred to me that fq | less might be a good alternative.
  2. Have an option for fq to follow just one process and stop. Maybe -1 (and then -2, -3, etc).
  3. Have a way to list the current and future jobs. Similar to the way fq -nqa lists current an past jobs. Also a way to list all jobs past and future with a clear mark on the currently running job. This is orthogonal to -q and -a and alternative to -n so maybe an option -X (letter to be chosen) such that fq -Xq prints current and future jobs and fq -Xqa prints past and future jobs (think "-a" to mean past and "-X" to mean future). I use head -1 ,* a lot, but it prints 3 lines per job instead of one and is only good for past and future, not just current and future (BTW: fq -qan has a noticeable delay probably due to stuff that is not necessary when just printing the first line).
  4. Have a clean way to interrupt a process; sending SIGTERM to the process doesn't seem to do "the right thing" in the sense that it's not equivalent to hitting control-C (e.g. sub-processes keep running). I may be wrong on this or there may be a trick I don't know.