[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in \[ special character handling inside PS1 ( PROMPTING )
From: |
Rahul Sahadevan |
Subject: |
Bug in \[ special character handling inside PS1 ( PROMPTING ) |
Date: |
Sun, 1 Apr 2001 00:57:38 +0530 |
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.5.1
Compiler: gcc
Compilation
CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='solaris2.5.
1' -DCONF_MACHTYPE='sparc-sun-solaris2.5.1' -DCONF_VENDOR='sun' -DSHELL -DHA
VE_CONFIG_H -DSunOS5 -I. -I. -I./include -I./lib -I/users/srahul/software/
SUN/include -O6 -fpermissive
uname output: SunOS <<Censored>> 5.7 Generic_106541-12 sun4u sparc
SUNW,Ultra-4
Machine Type: sparc-sun-solaris2.5.1
Bash Version: 2.04
Patch Level: 0
Release Status: release
Description:
The PS1 backslash escaped special character \[ for handling
unprintable characters in shell prompts is not handled correctly. If I
have 2 sets of \[ and \], the second set is apparently not handled
properly.
Repeat-By:
If I set my PS1 to "\[\e[01;36m\][\h]\w: \[\e[00;32m\]" and then
cd to a very deeply nested directory ( $COLUMNS is 80 ) such that the
directory path is about 90 chars, then the prompt is incorrectly
printed. ie the first 88 characters of the path are printed ( after 80
chars, the next 8 chars wrap to the next ( = 2nd ) line ), followed by
an unexpected newline, followed by the remaining characters of the path
on the 3rd line. If I remove the "\e[00;32m" and the enclosing \[\],
then it displays correctly. So I assume that the 8 non printable
characters sent to the terminal inside the 2nd \[\] block is not handled
correctly. I am on Solaris 2.7 with TERM as rxvt or screen and using
ncurses 5.1.
Fix:
Don't know...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug in \[ special character handling inside PS1 ( PROMPTING ),
Rahul Sahadevan <=