Wrapper to log stdout and stderr of command run for quick reuse. Useful while developing shell pipelines with long-running commands and for rich command history.

Daniel Sheffield d332cea0b0 add support for limiting list length and ensure fzf query takes part in find command 4 months ago
rc 3b153b8d5f previous approach actually wasn't working 4 months ago
README.md 848ae5c7b2 add readme 4 months ago
capture.sh aed81abc6f rename autolog to capture 4 months ago
recall.sh d332cea0b0 add support for limiting list length and ensure fzf query takes part in find command 4 months ago

README.md

Recall

  • capture - Save stdout and stderr for every command
  • recall - Reuse stdout for pipeline or otherwise

Examples

I do a find with copious output...

capture find . # stderr and stdout are saved to file and printed to console as usual

Forgot to pipe to less...

recall find | less # pipe last captured output from `find` command to `less`

Now I want to test my grep...

recall find | grep 'pattern' # no-need to run find again, only need the output

With aliases in .zshrc and .shrc...

+ find .
@ find | less
@ find | grep 'pattern'

I want to build a complex pipeline with many long running commands...

+ find | + grep 'pattern' | + cut -d '/' -f2  # initial attempt
@ find | + grep 'pattern2' | + cut -d '/' -f2 # ok, grep pattern is right
@ find | @ grep | + cut -d'/' -f2             # good to go

# run full pipeline
find . | grep 'pattern2' | cut -d '/' -f2