Olivia5k / doge

wow very terminal doge
https://pypi.python.org/pypi/doge/
MIT License
961 stars 91 forks source link

doge.txt: Make color escape sequences conform to terminfo #48

Closed keithw closed 10 years ago

keithw commented 10 years ago

doge.txt combines multiple 256color rendition changes in the same SGR sequence, e.g., ESC [ 48;5;179; 38;5;100 m to change both the background and foreground color.

The xterm-256color terminfo entry requires (and mosh enforces) that these be in separate escapes.

Example: echo -e "setab 179\nsetaf 100" | tput -S | od -c generates ESC [ 48;5;179 m ESC [ 38;5;100 m.

File converted with: perl -0777 -wpe 's{;38;}{m\033[38;}g' doge.txt

Fixes #43. (Also reported at https://github.com/keithw/mosh/issues/519)

Olivia5k commented 10 years ago

Cool stuff! Thanks for the patch! It might be a good thing to report this to img2xterm as well, since that's how the Shibe was generated in the first place.

keithw commented 10 years ago

Thanks, reported there as well.