bugGNU Screen - Bugs: bug #25600, Bash prompt history extra character

 
 

bug #25600: Bash prompt history extra character

Submitted by:  None
Submitted on:  Mon 16 Feb 2009 08:26:48 PM UTC  
 
Category: User InterfaceSeverity: 3 - Normal
Priority: 5 - NormalStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: 4.0.3
Fixed Release: NonePlanned Release: None
Work Required: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 19 Mar 2009 03:05:36 PM UTC, comment #2:

Thanks, that fixed the problem.

Anonymous
Wed 18 Feb 2009 06:07:12 PM UTC, comment #1:

No; but outside of screen (in gnome-terminal), an extra space appears before the "$" sign.

I think your problem is that the \n should not be surrounded by \[ \]: bash needs to "see" the \n so it knows to reset the character count. Removing those fixes the problems I saw in both screen and gnome-terminal.

Micah Cowan <micahcowan>
Mon 16 Feb 2009 08:26:48 PM UTC, original submission:

I think this is a bug with screen, however it could be a bug with bash.

When I set my PS1 to this:

PS1='\[\e[0;34m\]\t \[\e[0;32m\][\[\e[0;36m\]\u\[\e[0;36m\]@\[\e[0;36m\]`hostname | tr [:lower:] [:upper:]` \[\e[0;37m\]\w\[\e[0;32m\]]\[\n\]\[\e[0;32m\]\$ \[\e[0;37m\]'

Every time I use the up arrow in bash to get the history commands, there is an extra character left over at the beginning of the line. It doesn't happen when I'm not using screen.

Michael Wozniak - -unavailable-

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by micahcowan (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Feb 2009 06:07:12 PM UTCmicahcowanStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1