-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Reduce the amount of startup banner text #16516
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
Reduce the amount of startup banner text #16516
Conversation
This PR does not set -nologo as the default, instead it removes the copyright line, the two "how to get help" lines and two blank lines around the "how to get help" lines.
|
Convert to draft until PowerShell Committee conclusion. |
|
There are 3 articles:
|
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
|
@rkeithhill would you mind adding a test? |
|
@PowerShell/powershell-committee reviewed this, we are ok taking this PR with just the |
|
@SteveL-MSFT I can add look at adding a test. Are there any existing tests for the startup banner text? |
src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx
Show resolved
Hide resolved
|
@rkeithhill We have xUnit tests in test_CommandLineParser.cs. You could add new tests in the file. |
There is a related problems with "". I'd ask the team and PowerShell Committee to look #15607 (comment) so that we could continue with #15603. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@SteveL-MSFT I think the best place for tests is in |
|
FYI, I'm trying to sort out the Linux Pester test failure but the line number the log shows seems odd. Anyway, trying to build & run my tests on WSL/Ubuntu to see if I can repro locally. |
|
@iSazonov @adityapatwardhan Any idea why I would be getting this ANSI in my output from the What's with the |
|
@rkeithhill You could set env variable TERM=dumb to disable VT mode. |
|
@iSazonov Thanks but I've found something that works. I'm not keen to set the TERM=dumb on the Pester process side. And doing it in the new pwsh process isn't much different than my current fix which is to first execute: |
|
TERM=dumb turns off DECCKM too and simplify the test code. |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
@iSazonov Done. Thanks. |
|
@adityapatwardhan This PR is ready to go (merge). |
| # Set TERM to "dumb" to avoid DECCKM codes in the output | ||
| $oldTERM = $env:TERM | ||
| $env:TERM = "dumb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be done only on non-Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably only needs to be done non-WIndows since the DECCKM failures I saw were on mac/linux. That said, I don't believe it hurts to set TERM="dumb" on Windows.
|
@rkeithhill Thank you for your contribution! |
|
🎉 Handy links: |
|
I just noticed this. Thank you. |
PR Summary
This PR does not set -nologo as the default, instead it removes the
copyright line, the two "how to get help" lines and two blank lines
around the "how to get help" lines.
The following is the resulting startup banner when there is no update available OR the user has disabled updating checking via the
POWERSHELL_UPDATECHECKenvironment variable:compare this with the current startup banner:
When there is an update available AND the user has not disabled update checking, the reduced startup banner looks like this:
If we decide that we want to keep the
Type 'help' to get help.text, I propose something like this:BTW here are some other startup banners for comparison:
As you can see, bash and nodejs have no startup banner text at all and Python's is a bit wordy. :-)
PR Context
Addresses #15644
Regarding documentation impact, I think this would only impact images/text blocks where the PowerShell startup banner is shown. But what I'm seeing so far in the online help is images of Windows PowerShell startup banner text. @sdwheeler are there areas of the online help where PowerShell v6/7 startup banner text is shown?
This PR currently leaves the profile timing text as-is.
The PR is meant to give folks a way to test drive a reduced startup banner.
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.(which runs in a different PS Host).