-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add help strings in PowerShell banner #5275
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
| Copyright (c) Microsoft Corporation. All rights reserved.</value> | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
|
||
| To get help type Help or Help followed by a command name, such as: Help Get-Process |
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.
Perhaps instead of giving an example just recommend typing Help. the default help topic is about using the help system.
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.
I agree that we can simply say:
Type `help` to get help.
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
|
||
| To get help type Help or Help followed by a command name, such as: Help Get-Process | ||
| To get PowerShell Online Help open the link: https://aka.ms/pscore6-docs</value> |
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.
As much as I hate to add another new line, I very much would like to have URLs on their own line. That makes them easier to grab and for limited width consoles it reduces the risk of it being line wrapped.
For PowerShell Help online, visit:
https://aka.ms/pscore6-docs
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.
I would prefer this link to be in the help text since the link isn't clickable
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.
Previously we already added Online Help link in pwsh command line help - the idea was that today we always is in Web and Azure. The link can be easily copy-pasted.
What about:
Type 'Help' to get help.
Type 'Start-Process https://aka.ms/pscore6-docs' to get Online Help.
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.
Start-Process makes no sense on linux with a URL.
The link is clickable in KiTTY, so that kind of depends on the console app.
I see benefit in the link being displayed in the banner, but only if the URL is on a line by itself. Though, having it in the default help topic is a good alternative. As a user, I am not a fan of apps with long wordy banners.
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.
I don't like long banners too but the idea is to follow Bash-style and to be web/Azure-friendly.
I expect Start-Process works on Linux by mean of XDS. I don't know about MacOs.
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.
I expect Start-Process works on Linux
Assuming you are in a Linux GUI, maybe. it most certainly doesn't work in any of the ~20 Linux VMs I have pwsh installed on. It definitely wont work raspberry pi. It is better to assume a user is not in a GUI with Core, IMO.
Providing just the link in an easy to read, select, copy and with the least risk of line-wrapping is the best bet if we are to provide it in the banner at all, IMO. Might not even need an explanation as the URL is decently self-explanatory:
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'Help' to get help.
Bash doesn't have any enforced banners from bash itself, I don't think. If we follow bash style, it will show nothing unless the user/system admin deems it necessary. So I'm not sure what you mean by bash-style. Can you provide an example? (and lets not go by python's REPL, that thing is painful)
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.
Sorry, skip my comment about Bash banner - I means whole original Issue in wrong context.
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.
Why upcase the H i.e. why not Type 'help' to get help.? That feels more *nixy. :-)
Also, someone should consider updating the Get-Help topic because when you execute help (or man on Windows) and get this topic that talks all about Get-Help, it can be a bit confusing. I think the LONG DESCRIPTION should mention the fact that:
helpexists as a function wrapper to the Get-Help command that pages the output to the console. On Windows,manis an alias for thehelpfunction. On Windows, the default pager is more.com. On other systems, it is less. You can select a different pager utility with the$env:PAGERenvironment variable. For example, if you have less on your Windows system you
can set $env:PAGER to the path to less and the help function will use less to page Get-Help output.
| Copyright (c) Microsoft Corporation. All rights reserved.</value> | ||
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
|
||
| To get help type Help or Help followed by a command name, such as: Help Get-Process |
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.
I agree that we can simply say:
Type `help` to get help.
| Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
|
||
| To get help type Help or Help followed by a command name, such as: Help Get-Process | ||
| To get PowerShell Online Help open the link: https://aka.ms/pscore6-docs</value> |
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.
I would prefer this link to be in the help text since the link isn't clickable
|
I would be fine with just: with the lowercase |
Related #4986.