Announcing PSReadLine 2.2-beta.2 with Dynamic help

Jason Helmick

We are pleased to announce the new feature Dynamic Help inPSReadLine 2.2.0-beta.2.Features like TabCompletetion and the Help system make PowerShell easier to use. Expanding on thattheme, Dynamic Help provides just-in-time help at the command line. This experience allows you tostay focused on your work in the terminal without losing your place typing on the pipeline.

Supported Releases

Dynamic Help is implemented and presented through the PSReadLine module. In an effort to bring thebenefits of Dynamic Help to the most users, Dynamic Help is supported down-level to WindowsPowerShell 5.1.

PSReadLine 2.2.0-beta2, including Dynamic Help, is supported in the following versions:

  • Windows PowerShell 5.1
  • PowerShell 7.0+

Install PSReadLine with Dynamic Help

To receive the benefits of Dynamic Help, download and install the PSReadLine module from PSGallery.

Install-Module PSReadLine -AllowPrerelease

Getting Cmdlet Help

Dynamic Help provides a view of full cmdlet help shown on an alternative screen buffer using a crossplatform Pager utility. PSReadLine maps the function ShowCommandHelp to the F1 key.

  • When the cursor is at the end of a fully expanded cmdlet, pressing F1 displays the help forthat cmdlet.
  • When the cursor is at the end of a fully expanded parameter, pressing F1 displays the helpbeginning at the parameter.

Image DynHelp1

The Pager in PSReadLine supports viewing content one screen at a time. To navigate the displayedhelp content, press the up and down arrow keys to scroll the screen. Pressing Q exits thealternative screen buffer and returns to the current cursor location in the the primary screenbuffer.

The Pager is a work in progress and we welcome your feedback and suggestions. To provide feedbackand for more information, see the Pager repository on GitHub.

Focused Parameter Help

Pressing the Alt-h key combination provides dynamic help for parameters. The help is shown belowthe current command line like MenuComplete. The cursor must be at the end of the fully-expandedparameter name when you press the Alt-h key.

Image DynHelp Alt H

Note


The PSReadLine function ShowParameterHelp is bound to Alt-h.The Alt bindings do not currently work on macOS as detailed in thisissue. Mac users will need to mapShowParameterHelp function to an available key combination.

Set-PSReadLineKeyHandler -chord "Ctrl-l" -Function ShowParameterHelp

Selection of Arguments

To rapidly select and change the arguments of a cmdlet without disturbing your syntax, pressAlt-a. Selection of arguments is scoped within a script block. Based on the cursor position, itsearches from the innermost script block to the outmost script block, and stops when it finds anyarguments in a script block scope.

Image dynhelpA

Note


The PSReadLine function SelectCommandArgument is bound toAlt-a. The Alt bindings do not currently work on macOS as detailed in thisissue. Mac users will need to mapSelectCommandArgument function to an available key combination.

Set-PSReadLineKeyHandler -chord "Ctrl-k" -function SelectCommandArgument

Feedback and Support

Community feedback is essential to the iterative development of PSReadLine and features like DynamicHelp. Thank you for your continued support and engagement. To file issues for PSReadLine or DynamicHelp, please visit the PSReadLine repository.

Jason Helmick

PowerShell Team