You are not logged in.

#1 2012-07-08 12:52:54

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Bash prompt issue

Hey,

I've been playing around with my bash prompt (I colorized a prompt I've been using for a long time) but ever since, I'm getting weird issues with it. I'm not exactly sure how to explain, but it's like a part of the previous command 'gets stuck' and it'll show on every new prompt I get (in the same terminal, other (new) terminals aren't affected).

For example, if I have used nano with the following command:

nano <file>

Then the 'nano' part will display on the prompt after I have closed the file. The first few letters I then type for the new prompt, don't show. The issue goes away when I type 'clear'.

Another one, but less frequent, is that the current line I'm typing suddenly moves up. This usually happens with long commands, such as

for i in foo; do bar; done

I will add a screenshot when it happens again and here's my prompt:

PS1='\e[0;34m\]┌─[\e[0m\u@\h \W\e[0;34m\]]\[\e[0;33m\][${cwd}\t]\[\e[0m\] ${fill}\n\[\e[0;34m\]└─■\e[0m '

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2012-07-08 12:56:57

Psykorgasm
Member
Registered: 2011-11-24
Posts: 178

Re: Bash prompt issue

Are you using rxvt-unicode?
I've suffered this after using rather long commands, it happens very rarely though. It also happened with using the stock PS1. Never with nano though and I haven't experienced your second, line moving issue.

Last edited by Psykorgasm (2012-07-08 12:57:10)

Offline

#3 2012-07-08 13:09:49

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Bash prompt issue

Psykorgasm wrote:

Are you using rxvt-unicode?
I've suffered this after using rather long commands, it happens very rarely though. It also happened with using the stock PS1. Never with nano though and I haven't experienced your second, line moving issue.

Yes, I'm using rxvt-unicode. I'm using a patched version (font spacing) but I'm pretty sure this shouldn't have to do with it


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#4 2012-07-08 18:43:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Bash prompt issue


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2012-07-08 19:45:07

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Bash prompt issue

Thanks JWR. I have edited the prompt and will go check now. I can't reproduce the 'bug' myself, it appears at random when I'm doing things so we'll see if I ever get it again. I'll report back when I get it again and if not, I'll edit this post tomorrow evening and make it solved!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB