[Top][All Lists]

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

Re: BASH bug CDPATH plus redirection

From: Tim Mooney
Subject: Re: BASH bug CDPATH plus redirection
Date: 28 Jun 2001 19:42:42 GMT

In article <address@hidden>,
 <address@hidden> wrote:
> >I suggest you set your CDPATH variable in your .profile or .bash_profile,
> >and not export it.  That way you have it for interactive use, but it
> >won't get in the way of scripts, etc.
> Yes well umm, the issue is not whether I can get around it, the issue
> is that cd should never echo anything when it successfully executes
> in a script.

Maybe, maybe not.  Chet and others would know what the standards say in
this area, if anything.  If they say nothing, maybe you're right.

What you're suggesting is that special code should be added to bash, so
that in the event that it's executing a script and CDPATH is set, it would
not output the PWD after changing directory.  Or, stating it another way,
in the event that it's running as a login/interactive shell it *will*
output PWD after changing directory.  Either way, you're special-casing
how cd acts.

What I'm suggesting is "Why add bloat to bash, when the workaround is as
simple as managing your environment?"

Maybe I'm wrong, but it doesn't seem like adding this feature adds anything
but size to the executable.

> >;-) If there's an area where "ash" is more "correct" than bash, I've not
> >seen it.
> I think you may have seen it now.

I'm still looking, honestly.

Your other issue, with regard to redirection, seems to be closer to a possible
bug than the CDPATH thing, to me.  You definitely did the right thing reporting
both of the problems.

Tim Mooney                              address@hidden
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

reply via email to

[Prev in Thread] Current Thread [Next in Thread]