[Top][All Lists]

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

Re: BASH_ENV and $0

From: Tapani Tarvainen
Subject: Re: BASH_ENV and $0
Date: Fri, 23 Jul 2021 09:43:44 +0300

On Thu, Jul 22, 2021 at 03:14:39PM -0400, Chet Ramey ( 
> On 7/22/21 9:06 AM, Tapani Tarvainen wrote:
> > But that does not work: it turns out that $0 is always "/bin/bash" in
> > .bashenv (or just "bash" if called as "bash script"). Apparently $0 is
> > only set to the script name after .bashenv has been processed, and it
> > isn't in any other environment variable either.
> I took another look at this -- this is not the first request to make the
> shell script filename available in startup files -- and I don't think
> that it will break anything or add an incompatibility to set $0 as
> requested here.

Agreed. As it is, $0 is useless in the startup script and there's no
reason for anyone to have used it, so such a change should not break

Is there something I could do to increase the chances of that
happening, like submitting a feature request somewhere?

Tapani Tarvainen

reply via email to

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