Apologies. It's mentioned a few paragraphs further down.
Can I suggest a change?
How about instead of:
When an interactive shell that is not a login shell is started
something like:
When a shell is started that is not a login shell, but is
either an interactive shell or a network shell
On Sat, Jun 2, 2012 at 10:15 AM, Mikel Ward <[email protected]> wrote:
> bash sources .bashrc even for some non-interactive shells.
>
> For example with
>
> echo \$- is $-
>
> in ~/.bashrc, and shell set to /bin/bash (bash 4.2.28)
>
> ssh -n -T localhost true
>
> produces the output
>
> $- is hBc
>
> I assume this is caused by this code in shell.c
>
> if (run_by_ssh || isnetconn (fileno (stdin)))
>
> The man page says
>
> When an interactive shell that is not a login shell is started,
> bash reads and executes commands from ~/.bashrc,
>
> but makes no mention of the special handling for ssh and rsh.
>
> This seems to have been the case since at least bash 2.02.
>
> I'd argue this is a misfeature, but I guess that ship has sailed. Can
> the man page at least be updated?
>
> Thanks