nvi2 icon indicating copy to clipboard operation
nvi2 copied to clipboard

Print escape sequences from `!` output

Open unrealapex opened this issue 6 months ago • 1 comments

The escape sequences from ! shell command output are shown raw instead of being printed out. Changing this behavior to print out escape sequences would be useful because programs sometimes color their output with escape sequences and I would like to see those colors and other modified text attributes when filtering lines from nvi. For example, trying to filter a diff through diff-so-fancy, a diff colorizer: image of diff with raw escape sequences

ed prints out escape sequences, so it would be logical for nvi to do the same.

image of colored diff

unrealapex avatar Jul 12 '25 00:07 unrealapex

I think it's a reasonable request -- when running commands where the output is for display purposes only, display them as-if the command ran in a terminal. I've checked that in this mode, stdout is indeed connected to tty, but curses may be in the way.

lichray avatar Jul 12 '25 07:07 lichray