metal3d / bashsimplecurses

A simple curses library made in bash to draw terminal interfaces
BSD 3-Clause "New" or "Revised" License
902 stars 117 forks source link

Colors not working #26

Closed skamsie closed 6 years ago

skamsie commented 6 years ago

I tried running some of the examples, but instead of colors I get ansi escape codes... Any hints how to make it work? I tried with both the terminal app and iterm on macOS.

screen shot 2018-01-17 at 10 34 22 am

vaidd4 commented 6 years ago

Your terminal (or shell) doesn't seems to handdle the \E[ escape characters. You can try editing the simple_curses.sh file and replacing the escape characters by \033[ (arround line 200 to 260):

Try replacing all the:

echo -ne "\E[..."

By

echo -ne "\033[..."
metal3d commented 6 years ago

I think @vaidd4 is right, if that's true, I will change escape char in a futur release... Or maybe I should do that right now... I will try today.

skamsie commented 6 years ago

@vaidd4, @metal3d yes that would solve it. thanks for looking into this.