Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
On Unix, PowerShell should define the SHELL environment variable on startup #12150
POSIX-like shells such as
This variable is mandated by POSIX:
If PowerShell itself functions as the default shell,
Unix utilities may rely on the presence of this environment variable.
Therefore, PowerShell, like POSIX-like shells, should define
Written as of:
I don't think you can, but I don't think we have to:
Even non-POSIX shells such as
In other words: no existing utility can make fixed assumptions about specific behaviors exhibited by the user's default shell, as reflected in
However, knowing what shell is the user's default shell is important information, which PowerShell should provide too.
An important use case is that installer utilities may decide what shell-specific initialization files (profiles) they need to modify and how.