bug-bash
[Top][All Lists]
Advanced

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

Handling of \W in the PS1 prompt is buggy in certain cases.


From: dpovey
Subject: Handling of \W in the PS1 prompt is buggy in certain cases.
Date: Tue, 13 Nov 2012 17:26:07 -0500

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2 -Wall
uname output: Linux a01 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 
x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.1
Patch Level: 5
Release Status: release

Description:

If a directory is a subdirectory of / and has four or five characters in
its name, the PS1 prompt is wrong for it.  Examples below.


Repeat-By:

# Run the commands below.

root@a01:~# export PS1='\h:\W '
a01:~ cd /abcd
a01:acdd

a01:~ mkdir /abcde
a01:~ cd /abcde
a01:abdde cd ..

You can see that the prompts are garbled.

Fix:
        I don't have a fix.
        



reply via email to

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