1

I recently changed my .bashrc and tweaked how my PS1 looks, but now it has a very weird problem. Before the end of the line in terminal (about 2 3rds of the way in) it jumps back to the begining of the line like so:

e before itarcath@Highgate][~/.gconf/apps/gedit-2/preferences] how long can a command b 

My first thought was that it wasn't getting the terminal size properly but tput cols returns the correct value.

My.bashrc: http://github.com/Arcath/.Files/blob/master/dotfiles/.bashrc

1

I needed \[ and \] around the variables for colours, this commit shows my fix:

http://github.com/Arcath/.Files/commit/26527f678073e1b52449326521e98ebc8f3e47ac

  • The readline library also accepts SOH (\x01) and STX (\x02) control characters -- useful in other programs (such as Python) which have customizable prompts but not \[. – grawity Jun 2 '10 at 20:09

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.