[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wrong prompt and cd to root
From: |
Eric Blake |
Subject: |
Re: wrong prompt and cd to root |
Date: |
Sat, 7 Nov 2015 11:16:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/06/2015 07:14 PM, Seyyed Razi Alavizadeh wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H -I. -I../. -I.././include -I.././lib
> -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat
> -Werror=format-security -Wall
> uname output: Linux Razi-MM061 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8
> 14:46:51 UTC 2015 i686 i686 i686 GNU/Linux
> Machine Type: i686-pc-linux-gnu
>
> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
>
> Description:
> wrong prompt and cd to root
>
> Repeat-By:
> command "cd //" works and show prompt as "//$"
That's the correct behavior.
> Expected that "cd //" doesn't work or at least after CDing to root dir
> Terminal shows prompt as "/$"
POSIX requires that paths of // be preserved literally, because it has
implementation-defined semantics. If you are using a Linux kernel, //
is implementation-defined as a synonym for /, but on other platforms,
such as Cygwin, // is a distinct location (the root of
//machine/share/path notation) from /. Bash preserves the spelling of
// on all platforms, rather than trying to figure out whether // is a
synonym for /. So there is no bug here.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature