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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -