Re: Q. How do I get bash to respect my physical directory structure?



In article <c18e3af2-4388-417b-b011-abbe04949fdb@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Douglas Alan <darkwater42@xxxxxxxxx> wrote:
On Jan 6, 4:20 pm, pac...@xxxxxxxxxxxxx (Alan Curry) wrote:
You'd probably get better advice if you provided an actual example of
misbehavior instead of just ranting. Some kind of repeatable experiment.

$ mkdir shortcuts
$ ln -s /etc shortcuts
$ ls shortcuts/etc/../<TAB>

When you type the <TAB>, bash will show you the contents of
"shortcuts", rather than the contents of "/". This is the behavior
that I strongly dislike, and doesn't obey standard Unix semantics.

If you type <CR> instead of <TAB>, however, ls will show you the
contents of the root directory, as it should.

Now if you do

$ cd shortcuts/etc/..

the working directory will now be "shortcuts", rather than "/". I
strongly dislike this, but fortunately this behavior can be fixed via
"set -P".

$ set -P
$ cd shortcuts/etc/..

Now the working directory is "/". And all is good. (Modulo bash
filename completion and Emacs.)


So in summary, everything behaves normally as long as set -P is used. What
was your complaint?

.