nq
nq copied to clipboard
Brainstorming some ideas for nq
trafficstars
Some half-cooked random ideas:
- Have a "tail -f" mode for
fqwhich 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). Notefq | tail -fwon't work for this, although it just occurred to me thatfq | lessmight be a good alternative. - Have an option for
fqto follow just one process and stop. Maybe-1(and then-2,-3, etc). - Have a way to list the current and future jobs. Similar to the way
fq -nqalists 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-qand-aand alternative to-nso maybe an option-X(letter to be chosen) such thatfq -Xqprints current and future jobs andfq -Xqaprints past and future jobs (think "-a" to mean past and "-X" to mean future). I usehead -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 -qanhas a noticeable delay probably due to stuff that is not necessary when just printing the first line). - Have a clean way to interrupt a process; sending
SIGTERMto 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.
C-c is SIGINT, see https://unix.stackexchange.com/questions/362559/list-of-terminal-generated-signals-eg-ctrl-c-sigint