Op 22-07-2025 om 03:46 schreef Bart Schaefer:
On Mon, Jul 21, 2025 at 2:19 PM Martijn Dekker <martijn@xxxxxxxx> wrote:All the POSIXy shells care to this day, zsh included. So does tcsh.True, but that's not quite the same as it being useful. The shells all have other options to make them login shells ...
Yes. I didn't think quite all of them do, but I was wrong about that -- even dash has an -l option. It's not in POSIX though.
Ah. Found one: NetBSD sh doesn't have -l :-)
are there any other commands that need to be prefixed with a "-" in order to be treated as a login, either themselves or by some other thing examining the process list?
Not that I know of. Nor would this makes much sense, because the original idea is that the `-` is prepended by login(1) as it launches the login shell. Someone somewhere is probably using it in a script though...
-- || modernish -- harness the shell || https://github.com/modernish/modernish || || KornShell lives! || https://github.com/ksh93/ksh