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

Re: pushd/popd/dirs for es



>I'm opposed to overriding /bin/pwd. Csh does not do this. It has a separate  
>command "dirs" to give you its idea of the current working directory. Pwd  
>should grovel the filesystem and give me accurate (i.e. correct) information.  
>Think of pwd as relatively low-level functionality. If you want to introduce  
>a higher level user interface, give it a different name.

You'll notice I implemented `dirs' too. 

But I disagree that /bin/pwd prints "accurate (i.e. correct) information".
My version of pwd gives me precisely the semantics I want.  /bin/pwd
insists on resolving symlinks.  I hate this.  I create symlinks so I can
get in and out of particular directories easily---I don't want `cd ..' to
put me in some totally weird alien place.  This is one of the really icky
things I detest violently about eunuchs(tm).

I realize not everyone may agree with me, but renaming my pwd will mean
that other pieces of shell code will use the "wrong" version of pwd.  I
don't want that because it is both a performance hit and because things
won't preserve the cwd the way I want them to.

For people who don't want this feature, I could propose adding a variable
which lets you select either behavior.  But I think that's unnecessary.
Instead of setting a different gratuitous variable, why not just undefine
the function?