Hi, I use urxvt patched version from AUR.
My problem is : let's say I wrote a command that is a bit long and I make a mistake, when I use the top arrow to recopy the command to modify my mistake the lines overlap or get cut and everything becomes impossible to see...Is there a way to fix that? When I resize my terminal it doesn't fix it, it get fixed when I go full screen but my command is not long enough to take 2 lines on the terminal so I don't understand why it does that..
Is there anyway to fix this annoying bug?
I don't know what is an $TERM value, how do I check if I did that?
It may also be unescaped non-printing characters in your prompt. What is your PS1?
Does this also happen with the official urxvt package?
yes it happens with the official package too.
my PS1 : PS1='\e[0;36m\][\[\e[1;36m\]\u\[\e[m\]\e[0;36m\]@\[\e[1;36m\]\h\[\e[m\] \[\e[0;32m\]\w\[\e[m\]\e[0;36m\]]\[\e[1;39m\]\$ \[\e[m\]\[\e[0;37m\] '
For exemple I was just moving a text file called : blablabla-text-files001.txt
mv ~/Desktop/blablabla-text-files001.txt ~/Documents/blablabla-text-files001.txt
and when I was doing the auto completion for the second path it overlap my PS1...
Sometimes it happens when I forgot sudo so i click "arrow-up" to bring back my last command and it overlaps...I would understand if the termimal wasn't large enough but resizing just makes things worst...you just don't see what you are doing anymore. Going fullscreen fix it but it's annoying.
Yup, it's the PS1. You have some unescaped color codes - and many of them are redundant and/or unneeded as they are immediately changed before anything is printed.
All color escape codes should be enclosed in \[ \] pairs. Some of yours are, but others aren't. You also have some stray/mismatched \]s in there.
EDIT: I suspect this was your intent:
PS1='\[\e[0;36m\][\[\e[1m\]\u\[\e[0;36m\]@\[\e[1m\]\h\[\e[0;32m\]\w\[\e[36m\]]\[\e[1;39m\]\$ \[\e[0;37m\] '
as I was revising the PS1, it may have only been one missing \[ at the beginning. The redundant color codes would not cause any problems, they just make it harder to read.
Last edited by Trilby (2013-01-27 20:31:10)
Alright thanks, I'll try this and come back to you..I'm still pretty new and tried to build my own PS1...I guess I didn't understand it very well