miniblog.

← Back to all posts
76
I frequently find myself running: $ slowish $ slowish | jq $ slowish | jq | grep I feel there must be a better way to build up pipelines incrementally without re-running. I could save each output to a file, but it's more verbose, and most of these tools have nicer output when stdout is a TTY.

6 Comments

@wilfredh you can always use `unbuffer` to save the fancy terminal output to a file.
@jevinskie Ooh, I haven't seen this before. You mean unbuffer from the expect package I presume? https://jvns.ca/til/unbuffer/ So I could use unbuffer to make the command think it's writing to a TTY, and then use e.g. tee to save the output. That's a really interesting idea.
@wilfredh precisely!
I end up generally doing slowish | head -n5 > test.txt and then figure out the pipeline and then go back and replace cat test.txt back with slowish also just about to wrap up a small script to pipe to a spreadsheet instead, which may become my new, more easy to explore cache.
@wilfredh indeed.. a terminal that does something like slime/sly can (where you can back-ref numbered outputs of previous commands) would be awesome
This seems like it would be a great feature for the fancy shells like fish. Add some special syntax for a “cached pipe” and a way to bust that cache.