[Top][All Lists]

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

Re: CDPATH reports to stdout and even non-interactively

From: Matthew Woehlke
Subject: Re: CDPATH reports to stdout and even non-interactively
Date: Fri, 15 Aug 2008 19:35:44 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20080723 Fedora/ Thunderbird/ Mnenhy/

Geoff Kuenning wrote:
I don't mean that the shell should ignore ALL environment variables;
that would break a ton of scripts.  Even ignoring PATH would be a Very
Bad Thing, since we've long ago grown used to inheriting PATH.

Ignoring PATH would make life much, MUCH harder. I just finished writing a script that relies on PATH being set a particular way; in fact, I even check that it is and refuse to run otherwise. (Ok, I guess I could set the path myself, but it's for a development environment, and making the user do it means less chance for them to shoot themselves in the foot later because PATH is set wrong. Oh, and if ALL environment variables were ignored, I wouldn't even be able to fix PATH, because I need a different environment variable to know where the source tarball got unpacked... or else, the script would have to instead make assumptions about the current directory. So, ah, yeah, ignoring PATH would IMO be bad, ignoring /everything/ would cause me to find another shell that's less fatally brain-dead ;-).) And I know I have umpteen scripts floating around that are intended to run in a particular environment and will break otherwise. So... yeah, let's not go there ;-). (I wouldn't be surprised if CDPATH is the same way, to be honest, i.e. I wouldn't be surprised if there are scripts that require it to be set a particular way.)


Hmm, I know I rely on that, but maybe for starting new bash instances (i.e. set from script and rely on the new shell to inherit it). But I guess that's sort-of the whole point of the variable in the first place, so...


Again, if bash were to start ignoring HOME, I'm fairly sure that would break a bunch of my scripts. (Yeah. I have a particular environment in which I abuse HOME, setting it to something other than my home directory, but...)


See above ;-), but I guess you were already convinced that mucking with this would be a problem, so that's good :-).

In the beginning, there were not enough colors. -- Guy Keren

reply via email to

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