Open sebastien opened 10 months ago
Even supporting NO_COLOR
, change to the output could break scripts like these. I would prefer support for json output.
In the meantime, you should be using zellij list-sessions --no-formatting --short
in your script.
What's wrong with the --no-formatting
option? That's exactly the reason for it.
I didn't know there was a --no-formatting
option (not listed in --help
), but it does the trick. It would be nice to turn the --no-formatting
flag on when NO_COLOR
is set, but this solves my problem.
zellij
does not seem to support theNO_COLOR
environment variable, or have a a--no-color
option, which makes it hard to script the CLI as for instance:will fail with
while
The reason is that
LAST_SESSION
contains the color codes. Now, if we do this instead, this will work.TL;DR supporting
NO_COLOR
or--no-color
would make scriptingzellij
with the shell much easier.