Skip to content
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

Get-Help always launches online help if user has the -Online parameter defaulted to $true #1393

Closed
deadlydog opened this issue Nov 24, 2020 · 0 comments · Fixed by #1394
Closed

Comments

@deadlydog
Copy link
Contributor

I originally posted this bug in the VS Code PowerShell extension GitHub repo, but after digging through the code found that the bug was actually in this repository.

Basically the issue is that if the user has defaulted the Get-Help cmdlet's -Online parameter to $true, such as by putting this line in their PowerShell Profile:

$PSDefaultParameterValues.Add("Get-Help:Online", $true)

Then Get-Help will always launch a browser window. This causes an issue because VS Code (and other editors) use the getCommandHelp provider to provide the text for intellisense and tooltips. So whenever the editor would normally show intellisense or a tooltip, it instead opens a browser window to the online help page of the cmdlet. You can see this demonstrated in this gif.

PowerShellHelpAutomaticallyOpens

@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 24, 2020
deadlydog added a commit to deadlydog/PowerShellEditorServices that referenced this issue Nov 24, 2020
If the user has overridden the Get-Help -Online parameter to always be true, then the ShowHelpHandler will always launch a new browser window to the cmdlet help.
Instead, we want it to return the full cmdlet text as intended.
deadlydog added a commit to deadlydog/PowerShellEditorServices that referenced this issue Nov 25, 2020
If the user has overridden the Get-Help -Online parameter to always be
true, then calls to Get-Help will always launch a new browser window
to the cmdlet help. Instead, we want it to return the full cmdlet text
as intended.

fix 1393: Always use local help when retrieving Full help
deadlydog added a commit to deadlydog/PowerShellEditorServices that referenced this issue Nov 25, 2020
If the user has overridden the Get-Help -Online parameter to always be
true, then calls to Get-Help will always launch a new browser window
to the cmdlet help. Instead, we want it to return the full cmdlet text
as intended, otherwise things like intellisense and tooltips may end
up opening the cmdlet help in a new browser window.
deadlydog added a commit to deadlydog/PowerShellEditorServices that referenced this issue Nov 25, 2020
If the user has overridden the Get-Help -Online parameter to always be
true, then calls to Get-Help will always launch a new browser window
to the cmdlet help. Instead, we want it to return the full cmdlet text
as intended, otherwise things like intellisense and tooltips may end
up opening the cmdlet help in a new browser window.
@ghost ghost added the Status: In PR label Nov 25, 2020
TylerLeonhardt pushed a commit that referenced this issue Dec 1, 2020
If the user has overridden the Get-Help -Online parameter to always be
true, then calls to Get-Help will always launch a new browser window
to the cmdlet help. Instead, we want it to return the full cmdlet text
as intended, otherwise things like intellisense and tooltips may end
up opening the cmdlet help in a new browser window.
@ghost ghost added Status: Fixed and removed Status: In PR labels Dec 1, 2020
@andyleejordan andyleejordan removed the Needs: Triage Maintainer attention needed! label Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants