http://bugzilla.opensuse.org/show_bug.cgi?id=1164895
http://bugzilla.opensuse.org/show_bug.cgi?id=1164895#c6
--- Comment #6 from Neil Rickert ---
I'll note that I normally use "csh" (which is really "tcsh") as my shell.
And "csh" has always behaved this way (even before there was a "tcsh"). That
is to say "cd .." prunes the last item from $cwd. I consider this a feature,
not a bug. The Bourne shell worked the other way. But "bash" includes some of
the nice features from "csh", and I guess this is one of them.
If I start a subshell with the "csh" command, then "cd .." will work as you
expect, because $cwd is not passed to the subshell. However, if I start an
internal subshell by using parentheses, as in
( subshell commands )
then $cwd is passed.
It's a matter of getting used to your shell features.
With csh:
cd /var/run
pwd
returns "/run". But bash fakes that, too.
Hmm, if I invoke the shell as "/bin/sh" (instead of as "/bin/bash") it still
behaves that way. I suppose that's a "bashism". I don't know whether that
adversely affects any shell scripts.
If there is a bug, it would seem to me that the bug is that even when invoked
as "/bin/bash" it behaves the way you describe.
--
You are receiving this mail because:
You are on the CC list for the bug.