Hi all!
I've done a simple patch for this unexpected behavior.
I don't know if the previous message has arribed to the list because I
wasn't subcribed.
I hope this will be useful :)
--
......................................................................
__
/ / Jordi Prats Català
C E / S / C A Departament de Sistemes
/_/ Centre de Supercomputació de Catalunya
Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona
T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED]
......................................................................
pgp:0x5D0D1321
......................................................................
diff -Naur old/builtins/cd.def new/builtins/cd.def
--- old/builtins/cd.def 2006-07-28 03:35:36.000000000 +0200
+++ new/builtins/cd.def 2007-01-16 22:33:10.000000000 +0100
@@ -418,7 +418,12 @@
(nolinks != 0). */
tdir = nolinks ? sh_physpath (t, 0)
: sh_canonpath (t, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
-
+
+ if ((strlen(tdir)==2)&&(*tdir=='/')&&(*(tdir+1)=='/'))
+ {
+ *(tdir+1)=(char)0;
+ }
+
ndlen = strlen (newdir);
dlen = strlen (t);
--- Begin Message ---
Sorry, I didn't include the configuration information:
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-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. -I./include -I./lib -march=k8 -pipe -O2
uname output: Linux a64 2.6.13-gentoo-r5 #2 Wed Feb 8 14:02:44 CET 2006
x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
This is one bash, do you need all of them?
--
......................................................................
__
/ / Jordi Prats Català
C E / S / C A Departament de Sistemes
/_/ Centre de Supercomputació de Catalunya
Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona
T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED]
......................................................................
pgp:0x5D0D1321
......................................................................
--- Begin Message ---
Hi all,
I found a extrange behavior on bash in several machines:
[EMAIL PROTECTED] ~ $
[EMAIL PROTECTED] ~ $ cd //
[EMAIL PROTECTED] // $ pwd
//
[EMAIL PROTECTED] // $ echo $PWD
//
[EMAIL PROTECTED] // $ /bin/pwd
/
[EMAIL PROTECTED] // $ bash --version
GNU bash, version 3.00.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
This also happens on a 3.00.15, 3.1.14, 2.05b.0 on Linux and on 2.05b.0
on MacOSX.
I supose pwd it's a builtin command (as it's cd), so it just prints
$PWD. Is this a bug or a feature? I just found this because of a
misstyping, I'm asking this just for curiosity.
Thank you!
--
......................................................................
__
/ / Jordi Prats Català
C E / S / C A Systems Department
/_/ Centre de Supercomputació de Catalunya
Gran Capità, 2-4 (Edifici Nexus) · 08034 Barcelona
T. 93 205 6464 · F. 93 205 6979 · [EMAIL PROTECTED]
......................................................................
pgp:0x5D0D1321
......................................................................
--- End Message ---
--- End Message ---
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash