Terminal line resetting after about 50 characters -


my command line prompt reset after around 50 characters, including prompt. example, if prompt looks like:

user@computer$  

and start type

user@computer$ blah blah blah blah blah blah 

i'll point command line starts reset so:

blah blmputer$ blah blah blah blah blah blah 

does know why happening , how can fix it? thought problem iterm, looked @ default os x terminal , having same problem.

edit: looking more i'm realizing line resets fixed amount of characters end of window, not beginning.

the usual reason due not quoting escape sequences used color or highlight prompt in bash shell. if not that, bash counts escape characters "printing". same apply zsh (different quoting), bash happens default shell osx.

according xterm manual:

  • bash treats characters within "[" , "]" nonprinting (using no width on screen).

  • zsh treats characters within "%{" , "%}" nonprinting.

the place change shell's definition of ps1. bash prompt howto place read more.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -