On Wed 10 Jul 2024 at 16:00:48 (+0200), Nicolas George wrote:
> Greg Wooledge (12024-07-10):
> > You could -- but if you do so, you should definitely surround it with
> > a check for stdin being a terminal (test -t 0 or equivalent).
> 
> Does bash execute .bashrc when it is not interactive?

Someone might source .bashrc from a binary in order to
access functions that are defined within it.

> Does bash think it is interactive when its input is not a tty?

That would then be irrelevant.

Cheers,
David.

Reply via email to