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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -