You are not logged in.

#1 2013-01-27 06:52:36

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

urxvt bug when calling old commands

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?

Offline

#2 2013-01-27 06:56:00

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,304
Website

Re: urxvt bug when calling old commands

Sounds like a terminfo issue. Or you aren't doing anything silly like setting a $TERM value in your shell initialization files, are you?


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#3 2013-01-27 08:32:24

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

Re: urxvt bug when calling old commands

I don't know what is an $TERM value, how do I check if I did that?

Offline

#4 2013-01-27 08:44:25

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,304
Website

Re: urxvt bug when calling old commands

Some people put things like "export TERM=urxvt-256colors" in their .bashrc - that can lead to the sort of issues you are seeing...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#5 2013-01-27 12:03:06

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,484
Website

Re: urxvt bug when calling old commands

It may also be unescaped non-printing characters in your prompt.  What is your PS1?


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#6 2013-01-27 12:16:06

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,837

Re: urxvt bug when calling old commands

Does this also happen with the official urxvt package?

Offline

#7 2013-01-27 18:47:46

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

Re: urxvt bug when calling old commands

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.

Offline

#8 2013-01-27 20:21:58

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,484
Website

Re: urxvt bug when calling old commands

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\] '

EDIT2:
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)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#9 2013-01-27 20:28:20

trixrabbit
Member
Registered: 2012-11-27
Posts: 100

Re: urxvt bug when calling old commands

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

Offline

Board footer

Powered by FluxBB