-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Online support for about_... help topics #13550
Comments
This has been asked before. It would be nice if it didn't get closed this time (see #10306). Maybe we can just agree on some format for embedding the URLs into |
We add a comment header #11205 (comment) with meta information. |
Adding a comment to the about topics with the URI seems to be a great workaround until eventually there is a switch to md format. |
What do you mean by that? The comment says we could add… By the English grammar (We drink tea every morning), it looks like we added it every day, only to be undone overnight, hence no progress ☹ |
@AndASM your problem is you're trying to get help for a module you can't import -- please start a new issue instead of hijacking this one. |
Just an FYI for others that come across this and think about defaulting Get-Help -Online to $true, it currently breaks VS Code. See this issue for more info. |
@sdwheeler states in MicrosoftDocs/PowerShell-Docs#2939 (comment) that the As a temporary workaround, the following may be of interest: I've created a It's available from an MIT-licensed Gist - assuming you have looked at the code (which I can personally assure you is safe, but you should always check), you can install it directly:
See also these related suggestions:
I've also created helper functions for these; here are all three installation commands: # Show-Help function (wrapper for Get-Help -Online with support for about_* topics); e.g.
# Show-Help about_pwsh
# Show-Help about_Automatic_Variables PSItem
irm https://gist.github.com/mklement0/880624fd665073bb439dfff5d71da886/raw/Show-Help.ps1 | iex
# Show-OperatorHelp function (online help for PowerShell's operators; e.g.
# Show-OperatorHelp replace
irm https://gist.github.com/mklement0/146f3202a810a74cb54a2d353ee4003f/raw/Show-OperatorHelp.ps1 | iex
# Show-TypeHelp function (online documentation for .NET types and instances); e.g.
# Show-TypeHelp regex
# Show-TypeHelp datetime tostring
irm https://gist.github.com/mklement0/50a1b101cd53978cd147b4b138fe6ef4/raw/Show-TypeHelp.ps1 | iex |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
2 similar comments
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This one really should not be closed -- instead, it should be implemented. |
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
Get-Help can display both locally cached help files and online resources.
Since online resources do not require prerequisites like Update-Help and are always up-to-date, and since online resources are much better formatted and include navigation to discover related items, a "Copy" button to copy&paste sample code, and more, many users default to using online help, i.e. by adding this to their profile:
Now, without any prerequisites, users can easily display cmdlet help in an extra window like so:
However, Get-Help -Online can only show help topics with a dedicated URI property. That's why all about_... topics fail to display even though there are online versions available.
Steps to reproduce
Expected behavior
When Get-Help is used with -Online, it should detect whether the requested help starts with about_ and then construct the appropriate URI rather than fail. This could be done with a hard-coded topic list to include only the MSFT about_ topics, or simply done heuristically with the potential of failing for about topics from 3rd party.
If all else fails and there is no match, Get-Help -Online should default to the PowerShell documentation home page: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core This would enable users to try and search there rather than being left with a red exception.
Actual behavior
Get-Help -Online fails for any topic that has no distinct URI property
Environment data
The text was updated successfully, but these errors were encountered: