Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Piping rad-issue-list to pager wraps
Open did:key:z6MkwcUR...q1kL opened 8 months ago crate=radicle-cli type=feature

Piping the output of

rad issue list

to a pager makes the printed table wrap.

Reproduce with

rad issue list | less

vs

rad issue list | less -S

To see the difference (on a small enough terminal of course).

levitte commented 8 months ago

So rad issue list (as well as others) do not truncate when redirected to a non-terminal stream. Personally, I think that’s a feature.

z6MkwcUR...q1kL commented 8 months ago

rad issue list results in more than one screenpage of output for me on this repository. I run everything in zellij, with the UI of zellij locked. That means that every time I run rad issue list, I must unlock the zellij UI, then enable scrolling, and then scroll. That’s a lot of hassle just because the output of the command is too wide / too long.

I would pledge for a bit of a smarter command:

  • rad issue list by default opens and pipes to $PAGER automatically, if the output is too much for one screen (width or height)
  • rad issue list --no-pager prevents this behaviour

This would be similar to other tools doing it.

The same propably applies for other rad subcommands.


That said, this should probably be postponed for after the clap changes being merged ;-)