terminalizer icon indicating copy to clipboard operation
terminalizer copied to clipboard

Support for ANSI escape codes?

Open chris-hailstorm opened this issue 6 years ago • 2 comments

I use ANSI escape codes in my prompt:

$ echo $PS1
\[\033[7m\][\u - \w]\[\033[0m\] $

This creates a prompt with reverse video.

When I record a session using terminalizer, the prompt is captured like this:

content: "\e[7m[cjohnson - ~/proj/docker1]\e[0m $ "

And when I render this, it comes through as a solid block of white (characters not visible).

Can you suggest how to capture and render this -- special considerations for ANSI codes?

chris-hailstorm avatar Mar 19 '19 12:03 chris-hailstorm

Could you please provide your recording an a screenshot

faressoft avatar Jun 05 '19 20:06 faressoft

I can confirm this issue with terminalizer v0.6.1 when using a theme that has the background set to "transparent".

theme:
  background:  "transparent" 
  foreground: "#afafaf" 
  cursor: "#c7c7c7"
  black: "#161616"

To demonstrate it I made a recording of the following command. The ANSI escape sequences are RED, REVERSE, NORMAL, GREEN, REVERSE.

echo -e "\033[0;31myi\033[1;7myo"; echo -e "\033[0;0m"; echo -e "\u001b[32mhi\u001b[7mho"

render1574091383289

The behavior changes if I set the background to another color.

theme:
  background: "#161616" 
  foreground: "#afafaf" 
  cursor: "#c7c7c7"
  black: "#161616"

render1574092018704

urbanadventurer avatar Nov 18 '19 15:11 urbanadventurer