|
From: | Kelvin Lee |
Subject: | under cygwin incorrect prompt display with color code |
Date: | Tue, 17 Aug 2004 12:17:50 +1000 |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I. -I. -I./include -I./lib -pipe -O2
uname output: CYGWIN_NT-5.0 kelvinpc 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin
Machine Type: i686-pc-cygwin
Bash Version: 3.0
Patch Level: 0
Release Status: release
Description:
Under cygwin with the following prompt:
PS1="\[\033[106m\]\u@\h\[\033[m\]:\[\033[103m\]\w\[\033[m\]:\! \$ "
Inside xterm, the prompt would become:
joe@machine:~:999 $ $
Notes the double $ signs. (Notes joe and machine are displayed in colors correctly.)
The same PS1 works well on Linux boxes.
So looks like a cygwin specific problem.
Occasionally, the prompt can be displayed correctly (e.g. after pressing Tab for autocompletion).
But then the command line would be displayed incorrectly, looks like this:
joe@machine:~:999 $ $ ls t[TAB]
test/ tmp/
joe@machine:~:999 $ ls tt
Notes the second prompt is correct now but the last 't' character becomes 'tt'.
Repeat-By:
Simply set:
PS1="\[\033[106m\]\u@\h\[\033[m\]:\[\033[103m\]\w\[\033[m\]:\! \$ "
under a cygwin xterm.
Regards,
Kelvin Lee
// LANSA Product Centre
// LANSA Pty Ltd
// phone: +61 (2) 8907 0231
// mailto:Kelvin.Lee@lansa.com.au
[Prev in Thread] | Current Thread | [Next in Thread] |