tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: interactive shell detection in shrc
Date: Thu, 26 Sep 2024 15:16:39 -0700
From: "Greg A. Woods" <woods%planix.ca@localhost>
Message-ID: <m1stwmt-0036s2C@more.local>
| I'm very curious: why did you include "m" in that test?
I wondered about that as well. But I suspect you have
supplied the answer.
| I do note the following from the bosh(1) manual:
|
| ... POSIX requires that job control is auto-enabled for
| interactive shells ...
It actually requires it to be on by default in interactive shells,
that's almost what the above says, but it could be read as not
allowing "sh +m" to start an interactive shell with job control
disabled -- which is not what posix requires.
| But I'm pretty sure the key word there is "interactive", which will by
| definition also mean they have 'i' in $-.
It would, but as you point out -i isn't always available there, but -m
should be, so unless someone actually did run "sh +m" checking for -m
is I guess a way to guestimate that the shell is interactive (-m is,
in practice, almost never turned on or off on the command line, it
just defaults on in interactive shells, and off in others).
kre
Home |
Main Index |
Thread Index |
Old Index