PSReadLine 2.3.0-beta0 Release
We’re pleased to announce the new preview release of PSReadLine 2.3.0-beta0. This releasecontains several bug fixes and improvements to the
ListView Predictive IntelliSense.
Installing PSReadLine 2.3.0-beta0
The release is available from the PowerShell Gallery.
Use the following command to install PSReadLine using PowerShellGet v2.x:
Install-Module -Name PSReadLine -AllowPrerelease -Force
If you are using PowerShellGet v3, you can use the following command:
Install-PSResource -Name PSReadLine -AllowPrerelease -Force
You must include the Force parameter to install this version side by side with the defaultstable version.
You must restart your PowerShell session to use the new version ofPSReadLine.
Scrollable List View
A big feature of this prerelease is the scrollable list view. Previously, the
ListView mode islimited to show up to just 10 results. With this release, PSReadLine can show up to 50results. The view shows the first 10 results, but now you can use the UpArrow andDownArrow keys to scroll the list beyond the first 10 results.
When you have multiple providers loaded the ordering of predictors is still based on the order thatyou imported the PowerShell modules. The previous screenshot shows that the
Az.Tools.Predictor module was imported before the
If the providers return more than 50 results combined, the prediction results are distributed asevenly as possible based on the amount each provider returned.
New key bindings
Scrolling one line at a time can be slow for large lists. For a faster scrolling, we added new keybindings to help navigate the
|Move up a page|
|Move down a page|
|Move up to next predictor’s first result|
|Move down to the next predictor’s first result|
These key bindings only apply in
ListView isn’t enabled, these key bindings do whatthey normally do. As with any key binding, you can reconfigure the binding for these functions using
These functions are bound by default in Windows and Emacs
EditModesbut not in VI Mode.
Since we now have the ability to scroll through different results, we can adjust the height of the
ListView results with the shell’s window height. The maximum size is 10 lines, but it shrinks to 5lines if the
Console.BufferHeight is less than or equal 20 and to 3 lines when the height is lessthan or equal to 10. If the terminal width or height is too small,
ListView displays a warningmessage that the size is too small.
This is particularly helpful when using Azure Cloud Shell, because the default terminal height istoo small to show 10 results.
We’ve also included a new metadata line that show the line number of your selection the number ofresults available from each prediction source. The metadata line changes as you are scroll throughthe list.
Deduplication of prediction results
As more and more predictors are created, we’ve noticed a few cases where the same prediction cancome from multiple sources. To reduce the repetition of predictions, we’ve made a fix to removeresults returned by the history predictor. This means that if history has a prediction that anotherpredictor has, the result is only displayed from the history. This allows for more and differentresults to be displayed and reduces confusion between two predictions with the same exact syntax.
Change default color for inline prediction
We made a minor change to the inline prediction color to make it more easily readable on terminalsthat don’t use a pure black background, such as the VS Code terminal. The previous setting of
dark black has been changed to
dim white italic.
Bug fixes and new features
This release includes the bug fixes and community contributions detailed below. We really appreciateand value community contributions!
- Handle multi-line description for parameter help content (#3358)
- Update module version in bot messages (#3361)
- Add support for upcasing, downcasing, and capitalizing word (#3365) (Thanks @3N4N!)
- Fix parameter dynamic help when the help content is specified in ParameterAttribute (#3370)
- No list view prediction when the first line was scrolled up off the buffer (#3372)
- Fix wrong cursor position in menu completion (#3373)
- Fix ViModeIndicator = Cursor for Windows Terminal (#3374)
- Fix the description of CapitalizeWord (#3384)
- Place ViDGChord in the right group (#3422)
- Update the samples in README.md (#3440, #3424)
- Fix some typos in this repository (#3547) (Thanks @spaette!)
- Fix to use the default member color for members (#3450)
- Make tab completion show results whose ListItemText are different by case only (#3456)(Thanks @dkaszews!)
- Fix the menu completion to better handle the backspace key (#3574)
- Updating Fabric bot (#3540, #3576)
- Use ‘Visual Studio 2022’ as the image for appveyor CI (#3594)
As usual, we welcome feedback about this release! Since this is a beta release, designs and featuresare subject to change. You can submit bugs, feature requests, or questions to thePSReadLine repository. Your feedback is greatly appreciated!