Terminal prompt with escape codes

Issues related to applications and software problems
Post Reply
ChuckMcM
Posts: 1
Joined: 2014/08/21 22:35:24

Terminal prompt with escape codes

Post by ChuckMcM » 2014/08/21 22:53:48

Like a number of folks I like to put colors in my prompts (bash PS1 var) and when you do that on CentOS 6 terminal starts wrapping the text before it gets to the right side of the screen. If you send full ansi sequences like "\033[32;40;1m $FOO \033[0m [ \033[35;40;1m $BAR \033[0m ] $ " it gets really confused thinking your prompt is a good 20 - 30 characters wider than it actually is.

I'd like to either turn off the behavior in terminal where it trys to pre-emptively send a return or fix the prompt width calculation somehow.

--Chuck

Post Reply