bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with prompts (PS1) contaning ANSI codes


From: The Cyber God
Subject: Problem with prompts (PS1) contaning ANSI codes
Date: Wed, 27 Sep 2000 12:09:29 +0200 (IST)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: freebsd3.3
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='freebsd3.3' -DCONF_MACHTYPE='i386--freebsd3.3' -DCONF_VENDOR='' 
-DSHELL  -DHAVE_CONFIG_H   -I. -I/usr/local/include -I. -I./lib 
-I/usr/local/include -O -pipe
uname output: FreeBSD thegod.ath.cx 4.1-STABLE FreeBSD 4.1-STABLE #24: Wed Aug 
23 20:20:02 IDT 2000     address@hidden:/usr/src/sys/compile/THEGOD  i386
Machine Type: i386--freebsd3.3

Bash Version: 2.03
Patch Level: 0
Release Status: release

Description:
   If your prompt contains ANSI codes, like color-chaning codes, bash will
think that the prompt is longer than it actually is, so it will start a
new line before you actually reach the end of the line on the terminal.

Repeat-By:
   Just exectute the following code, and start pressing letters (not
enter). You will notice the problem :)

--Commands--
e=`printf "\033"`
end="$e[0m"
yellow="$e[1;33m"
blue="$e[1;34m"
magenta="$e[1;35m"
darkcyan="$e[36m"
export PS1='${magenta}(address@hidden)\$ '
--EOF--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]