coc-powershell icon indicating copy to clipboard operation
coc-powershell copied to clipboard

Get help for cmdlet

Open corbob opened this issue 5 years ago • 3 comments

resolves #26

Adding the powerShell/showHelp message.

This currently only gets help for the function test. This is the framework to get it working. Next step is determining what to send to PSES. I suspect we could do like vscode-powershell and if in Visual mode, send the contents of the highlight, if in a normal mode, then we get the current word (with expansion across the hyphen).

corbob avatar Jul 10 '19 02:07 corbob

Curious, what's the difference between showHelp and onHover? A few VSCode extensions now support "info pane" which places help info in a persistent window -- guess showHelp is similar?

Edit: if that's the thing, then I'll definitely map it to <F1>! :D

yatli avatar Jul 13 '19 17:07 yatli

Curious, what's the difference between showHelp and onHover?

showHelp sends a string to PSES which then evaluates it against Get-Help with -ShowOnline so it will open the online help. If there is no online help (or we can't reach the online help URI) then it will just output into the PSIC

corbob avatar Jul 13 '19 17:07 corbob

thanks for the explanation. I just played with it for a few commands, but it keeps landing on a 404 page. For example: Get-Help -Online Get-ChildItem

gets me: https://docs.microsoft.com/en-us/powershell/module/4.0/microsoft.powershell.core/providers/FileSystem-Provider/Get-ChildItem-for-Filesystem

yatli avatar Jul 13 '19 17:07 yatli