Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

New project to reuse output of commands



Hello,
would anyone participate? The goal is summarized in this video:

https://asciinema.org/a/bezp40yelxl0gkxay3pxkgzag

Putting this into text: reuse parts of output of commands without
mouse. Automatically save output of commands into files. Edit command
line from a curses interface, with access to the saved outputs and
history.

Main mechanism is simple and robust:

ztstart() {
  ...
  exec {ZTRACE_FD}>&1
  exec > >(tee -a "$ZTRACE_PATH/$fname")
}

ztstop() {
  ...
  exec >&$ZTRACE_FD && exec {ZTRACE_FD}>&-
}

Github site:

https://github.com/psprint/ztrace

Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author