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

Re: cd tracking symbolic links



| Gregory L. Snead wrote
| >   I'm curious of your reasons why this isn't the right thing to do.
| 
| Because then ``ls ..'' disagrees with ``cd ..; ls'' and I get confused
| by that.  Other people don't;  this hack's for them.

Paul is right that asymmetry between shell and kernel is irritating.  I
tend to blame ".." itself, which is a questionable feature when your
filesystem isn't really a tree.  If you have symbolic links (or worse,
union mounts or mounted streams) then ".." yields surprises all too
often.  If chdir's semantics were to set a default prefix this wouldn't
happen.  Enlightened systems like Sprite and QNX use prefix tables
internally instead of mount points anyway, so there is precident for
this, aside from VMS. :-)