zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.42k stars 611 forks source link

FR: Facilitate dump-screen to stdout #3369

Open n8henrie opened 1 month ago

n8henrie commented 1 month ago

Thanks for your work on zellij -- it's been fun and interesting learning to adapt my workflows!

I wanted to request the ability to dump-screen to stdout. At least on MacOS I can't find a simple way to do this:

$ zellij action dump-screen /tmp/foo.txt; head -n 1 /tmp/foo.txt
n8henrie@NatePro:~/git/espanso(no-cache)$ zellij action dump-screen /tmp/foo.txt; head -n 1 /tmp/foo.txt
$
$ zellij action dump-screen /dev/stdout
$

This would make it much easier to script actions that depend on output that hadn't necessarily been anticipated or intentionally captured to a variable, but has a predictable pattern (for me this is often unexpected build failures for nix builds, which end in something like for access to the full logs, run 'nix log /nix/store/asdfasfoiwjef-foo/woeifjoxidfjj-bar', where the /nix/store path is not predictable; being able to dump screen output to stdout would allow me to sed/grep/awk my way to running that nix log without having to manually copy and paste the exact path).

Thanks for considering!