-
Notifications
You must be signed in to change notification settings - Fork 129
Enable use of pwsh as login shell #186
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
So is the intent that I'll be able to do:
And then I'll have PowerShell as my login shell with all the environment goodness? Is that something that we'll ask the users to do? |
@rjmholt I think we decided to go against most of this given the prototype you coded the other day, yeah? |
I’m not sure how that would work with Windows though. Given that if you have a script on Windows that calls |
Maybe one day, it will be unix compat. :) |
Windows doesn't have a concept of a login shell, we only preserve the In any case, I don't like |
Ok so I've written a proper profiling script here: https://gist.github.com/rjmholt/1ec87842e1ab4655bac34405c7a719e2 Running 10000 iterations (~12 hrs) on an Ubuntu 18.04 VM looks like this: It compares:
Both |
So experimenting more, I've found a kink in this proposal, which is that On macOS, I believe on all the Linux distros we support, |
See my PR for this here: PowerShell/PowerShell#10050 |
macOS Catalina is now in Public Beta which replaces bash with zsh as the default shell. Might be worth checking if the bash behavior still works on this new OS |
If echo 'echo "PROFILE LOADED!"' >> ~/.profile
ln -s /bin/zsh ./sh
chmod +x ./sh
./sh -l -c 'echo "Hi"' Given that Perhaps the best option for us is to just point to |
There's no indication bash is coming out, but it looks like the most correct option on macOS is |
This would mean that we wouldn’t be backcompat though? |
I don't see any indication that Apple is removing |
An important question is whether I've tested the scenario where It's likely UPDATE: The current implementation invokes |
…for processing profile
Thanks to @SteveL-MSFT for the macOS updates. We'll have to continue revising that behavior to conform to Apple's changes over time. On the whole, given the low performance impact and having played with builds of this behavior already, @PowerShell/powershell-committee has enough quorum via me, @SteveL-MSFT, @daxian-dbw, and @JamesWTruher to accept this one. |
…erShell-as-Login-Shell.md
No description provided.