Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2000 01:33:03 +0200 (CEST)
From:      bdluevel@heitec.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/19388: bash prompt problem, or perhaps curses problem
Message-ID:  <200006192333.BAA00995@ heitec.net>

next in thread | raw e-mail | index | archive | help

>Number:         19388
>Category:       misc
>Synopsis:       bash prompt problem, or perhaps curses problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 19 16:40:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Luevelsmeyer
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
Heitec AG
>Environment:

	FreeBSD 4.0-Stable as of 2000-06-19

>Description:

	If you have escape sequences in a bash prompt, and execute
	several long commands (longer than one line) so that they
	are in the history buffer, and then press cursor-up and
	cursor-down to change between these commands, the prompt
	may be messed up and the displayed command lines too.

>How-To-Repeat:

	I assume you are in a bash shell (port shells/bash2), in a
	cons50 terminal with 80 columns.
	
	a) Get a prompt with escape sequences:
	    export PS1='\[\e[7m\]hello\[\e[m\]'
	b) Get suitable command into the history:
	    ab ab ab ab ab ab ... ab
	   (That is so many 'ab' groups that the last 'b' is in the
	    second row exactly under the first 'l' of the prompt)
	c) Get second command so you've got something to change:
	    cd cd cd cd cd cd ... cd
	   (Make it the same length, so the last 'd' is also
	    below the first 'l' of the prompt)
	d) Press cursor-up and cursor-down so you change between
	   these two commands in bash's history. Watch the prompt.

>Fix:

	Do not have escape sequences in the prompt.


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006192333.BAA00995>