-
Notifications
You must be signed in to change notification settings - Fork 501
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
Feature Suggestion: Cmdlet Help in Editor Right-Click menu #884
Comments
Hey Matt, we do have one way of getting help right now, you can run the "PowerShell: Get Online Help for Command" command which will send you to the online help for the cmdlet under the cursor (bound to Ctrl+F1 by default). Agreed, though, would be nice to add this to the right-click menu too. |
Good tip! Thanks! |
I've created a PR that I think resolves this, but it feels too simple for how long this has been opened... |
@mmarchese how valuable is the ShowWindow portion of this request? Being an electron application, when you launch Get-Help with -ShowWindow, the window often times appears behind the VS Code window. It is my understanding that there is nothing that we can do to resolve that behavior 😞. I have modified the ShowOnlineHelp call to do -ShowWindow instead of -Online and have found that the experience is very poor (particularly if you have other PowerShell windows open as you won't necessarily see that there's a new one). That being said, it's a simple enough add if it's desired I could look at implementing it more fully. |
I've also noticed that windows pop up behind the VS Code window. I've learned to deal with it (especially while using Multi Factor Auth with Office 365 connections) but it is rather annoying. I would say that popping up the Online version would be a better solution if that is possible since that can take focus immediately. Some cmdlets don't have proper links though (or help needs to be updated). If they don't have a proper link perhaps populating the help info into a terminal or the output pane would be preferable rather than having to look for a window behind VS Code. Hopefully, they will fix this some day soon. Do you know if there is an issue in the VS Code repo that I can upvote? |
I like the idea of if there is no help link to output somewhere else. I'm not sure how to get ti to the console, but it is something I'm interested in investigating, I have some code that will check for a related links section which I think is that would tell us if there's an online help for it. Regarding an issue, I'm not sure if there's an issue for it in the VS Code repo, it's more an issue with Electron itself (same issue if you use Hyper.js for your terminal, anything that shows a window will be behind he terminal). |
With regards to adding it as another submenu I don't think that's currently possible. There appears to be a Feature Request for it in the vscode repo here: microsoft/vscode#9827 If we're comfortable with the Ctrl+F1 going online if it's available and defaulting to -full if it's not then I think I can code that up. If we want them as separate commands, that's still doable, will just take more investigation to avoid duplicating code (doesn't make sense to me to have two call backs to PSES for effectively the same thing). |
It makes more sense to recreate In the future, this a good setup for for when PS Core starts rendering help in MarkDown. |
It would be nice to have a side by side view of the help next to the code if that were possible. Especially now that you can have up to 4 separate panes. |
Sometimes while editing in a PowerShell file I need to access Help about a cmdlet quickly. It would be nice if we could right click on a particular cmdlet and access its help file from the drop down list.
Perhaps have a submenu allowing for the help to be shown in the integrated console, show window or online as well?
The text was updated successfully, but these errors were encountered: