You are not logged in.
I've been having some trouble with gnome-terminal. No matter what size it is, after typing about 50 characters (inc prompt), it wraps onto the beginning of the same line, over typing the prompt. Like this:
I start typing:
[19:14:22 jack ~]$abcdefghijklmno
but when I continue:
FGHIJKL22 jack ~]$abcdefghijklmnopqrstuvwxyzABCDE
If I keep typing, it reaches the right hand side of the window (about 80 characters) and wraps OK, continuing on the next line.
Anyone ever seen this before? I've tried "pacman -Rscn"-ing gnome-terminal, and removing ~/.config/Terminal/ and ~/.gconf/apps/gnome-terminal/, then reinstalling the package, but to no avail. I've also tried the "terminal" package, which seems to be a very similar program, and had the same problem.
Any suggestions welcomed.
Jack
edit: add [solved] to title
Last edited by Jack B (2008-05-20 19:30:07)
Offline
This could be a problem with your prompt. Can you post the relevant part of your .bashrc?
Offline
Thanks skymt, right first time. I commented out my custom PS1, and used the standard arch one. The problem disappeared.
The problematic prompt is:
PS1='\e[0;32m[\t \u\e[0;34m \W\e[0;32m]\e[0;32m\$\e[m'
(should produce [hh:mm:ss username directory]$ in green except for the directory, which is blue)
I'm guessing the colourcodes are probably to blame?
Jack
Offline
Yeah, the colors are the problem. Bash makes you wrap non-printing characters in '\[' and '\]'. I've corrected the prompt for you.
PS1='\[\e[0;32m\][\t \u\[\e[0;34m\] \W\[\e[0;32m\]]\[\e[0;32m\]\$\[\e[m\]'
Offline
The colour codes were indeed to blame. The syntax "\e[0;32m" I found on a website somewhere is wrong, it should be "\[033\[0;32m\]"
Problem solved!
Edit: simu-post with skymt: I guess \e and \033 are equivalent, but the lack of \[...\] was the problem.
Thanks again.
Last edited by Jack B (2008-05-20 19:29:12)
Offline