yannjor / krabby

Print pokemon sprites in your terminal
GNU General Public License v3.0
136 stars 8 forks source link

Terminal color changes to black #14

Closed kushagra-xo closed 1 year ago

kushagra-xo commented 1 year ago

Screenshot_20231008_014434

OS: Arch Linux DE: Plasma Terminal: Konsole Shell: bash Install Source : AUR Krabby Version: 0.1.7

kushagra-xo commented 1 year ago

i have personally switched over to fish shell and i cannot reproduce it, and is henceforth not relevant to me anymore.

yannjor commented 1 year ago

interesting, seems to only happen on bash :thinking:

unit537 commented 1 year ago

Confirming this affects bash. I took a cursory look over the repo and I believe the issue is with the individual colorscripts files, specifically the last ANSI escape code in each file.

The Inkay, Honchkrow, and Whirlipede files end with "[0m", which is the code for reset/no color, but most of the colorsprite files end with the last ANSI escape code needed to color the last 'pixel' in the sprite, which seems to almost always be black for the border around the sprite.

I can confirm that Inkay, Honchkrow, and Whirlipede always leave my terminal foreground color intact. For getting random sprites, running krabby random; echo -e '\033[0m' always results in the foreground color being reset correctly. A quick fix might be appending "[0m" to the string you;re getting from the colorsprites files.

Arch/Kitty/Bash, installed from AUR, Version 0.1.7