-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add support for -l to pwsh so that it is compatible with POSIX shell expectations
#9528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx
Outdated
Show resolved
Hide resolved
…Strings.resx Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
|
Based on new RFC I think this should be |
|
@iSazonov the problem with calling it |
|
Linux users will very confused to see long form in docs - they expect "login" but get another. The current solution looks like a hoax. I think we could discuss this in your RFC. |
|
@iSazonov bring up as an issue in the RFC, we can still change while in Preview |
|
@anmenaga Please be sure to use squash and merge unless there is a good reason. |
PR Summary
POSIX shells have a
-lswitch to indicate it is a login shell which will process profiles. However, PowerShell by default already loads the profile and requires-noprofileto explicitly not load it. To make pwsh compatible with other tools (like VSCode) that expects a-lswitch, the change is to add-loadprofilealiased as-lso that it doesn't complain about that switch which is a no-op since we load the profile by default.Also sorted the switches alphabetically in the code.
PR Context
Fix #3600
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.