Replies: 2 comments 1 reply
-
Similar: #12134 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Helix is nit a pager and doesn't really intend to be one. Also it's conventional that programs disable ANSi escape sequences if they are piped so that seems like an issue with the prgroamms you are using. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In theory, a pager can handle ANSI color codes - although nearly all of them give up on the problem before trying. My most common pager use-case is glancing through
--help
guides, usually for a Nushell command. Like all of Nushell, the colors are baked in for ease of use. I usually need to runcommand --help | ansi strip | hx
to make any sense of a command using helix as a pager.Only... why is that so desirable? If the colors are there, use them!
Another case that comes up so so so much, is caused by mixing Zellij and Helix; Zellij is a hypermodern tmux replacement, and has a quick keybind for opening your scrollback inside your editor. Once again, doing so clobbers any colors your console may be displaying.
No one says this is easy or simple! ANSI is gnarly and always has been. Same could be said of syntax highlighting, demanding the tree-sitter dependency as the only pleasant approach.
Could we have anyone close enough to the problem sound off on possible mechanisms to accomplish this? I see the procedure as being:
plain/ansi
Hope I can learn more in the process.
Beta Was this translation helpful? Give feedback.
All reactions