Closed willmcgugan closed 2 years ago
Did this get added? Don't see a linked PR. I tried | less
and | head
, and both remove the highlighting, which is why I'd use rich-cli in the first place - I can always cat
or use NOCOLOR
if I don't want highlighting. :)
Ahh, I see https://github.com/Textualize/rich-cli/commit/12fed46d2368674b1ff6ae32903e23601c52bed3, so I guess yes?
Also there are no tags or GH releases, so it's hard to see what's released and what's just in main. Could I also request a --version
flag so I can tell what I'm running? :)
Ah, pip cache purge
let me get the new version, it seems --force-terminal
has even been released. Would love a version flag. ;)
head
and tail
work with --force-terminal
(though less
and more
don't, for some reason I thought they supported escape sequences)
Ouch! Not only does -h
not give help like most apps, but now it's taken as a shortcut to --head
instead of --help
. I'm sad.
@henryiii You'll need to use less -r
when piping to less to tell it to interpret the sequences.
Fantastic, thanks! --pager
helps, but it doesn't support /
search (yet?), so using a pager that does can be useful.
We will need a --force-terminal switch (plus single letter -f if its free) which forces terminal output. To allow users to pip to a file while allowing ansi codes (for pagers etc).