Re: why is the - modifier useful
Martijn Dekker <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
Op 01-07-2025 om 10:52 schreef Peter Stephenson: > On 01/07/2025 09:26 BST Marc Chantreux <[email protected]> wrote: >> then I realize this custom came for reason: - is already a >> builtin which seems really useless to me: > > It's not very useful. The convention used to be any command starting > with a "-" was a login shell, so you could start up your own command and > anything that cared would notice. I'm not aware of anything that still > cares. All the POSIXy shells care to this day, zsh included. So does tcsh. E.g., the zsh command - bash starts bash as a login shell by prepending a - to $0. This makes bash execute different profile scripts and makes the 'logout' command available. -- || modernish -- harness the shell || https://github.com/modernish/modernish || || KornShell lives! || https://github.com/ksh93/ksh