Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add support for -l to pwsh so that it is compatible with POSIX shell expectations#9528

Merged
anmenaga merged 8 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:login-shellSteveL-MSFT/PowerShell:login-shellCopy head branch name to clipboard
May 7, 2019
Merged

Add support for -l to pwsh so that it is compatible with POSIX shell expectations#9528
anmenaga merged 8 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:login-shellSteveL-MSFT/PowerShell:login-shellCopy head branch name to clipboard

Conversation

@SteveL-MSFT

@SteveL-MSFT SteveL-MSFT commented May 3, 2019

Copy link
Copy Markdown
Member

PR Summary

POSIX shells have a -l switch to indicate it is a login shell which will process profiles. However, PowerShell by default already loads the profile and requires -noprofile to explicitly not load it. To make pwsh compatible with other tools (like VSCode) that expects a -l switch, the change is to add -loadprofile aliased as -l so 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

Comment thread test/powershell/Host/ConsoleHost.Tests.ps1
Comment thread src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx Outdated
…Strings.resx

Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label May 4, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.1 milestone May 4, 2019
@joeyaiello joeyaiello added Review - Committee The PR/Issue needs a review from the PowerShell Committee and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels May 6, 2019
@iSazonov

iSazonov commented May 7, 2019

Copy link
Copy Markdown
Collaborator

Based on new RFC I think this should be -Login or -LoginShell parameter.

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

@iSazonov the problem with calling it -LoginShell is that it doesn't make any sense for Windows. I don't think Linux users care about the long form as they would just use -l.

@iSazonov

iSazonov commented May 7, 2019

Copy link
Copy Markdown
Collaborator

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.

@anmenaga anmenaga merged commit e3e37a8 into PowerShell:master May 7, 2019
@SteveL-MSFT

Copy link
Copy Markdown
Member Author

@iSazonov bring up as an issue in the RFC, we can still change while in Preview

@TravisEz13

Copy link
Copy Markdown
Member

@anmenaga Please be sure to use squash and merge unless there is a good reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support -l for pwsh.exe

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.