{"id":19880,"date":"2023-03-13T07:47:28","date_gmt":"2023-03-13T15:47:28","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=19880"},"modified":"2023-03-13T07:50:05","modified_gmt":"2023-03-13T15:50:05","slug":"psreadline-2-3-0-beta0-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/psreadline-2-3-0-beta0-release\/","title":{"rendered":"PSReadLine 2.3.0-beta0 Release"},"content":{"rendered":"<p>We&#8217;re pleased to announce the new preview release of <strong>PSReadLine 2.3.0-beta0<\/strong>. This release\ncontains several bug fixes and improvements to the <code>ListView<\/code> Predictive IntelliSense.<\/p>\n<h2>Installing PSReadLine 2.3.0-beta0<\/h2>\n<p>The release is available from the <a href=\"https:\/\/www.powershellgallery.com\/packages\/PSReadLine\/2.3.0-beta0\">PowerShell Gallery<\/a>.<\/p>\n<p>Use the following command to install <strong>PSReadLine<\/strong> using <strong>PowerShellGet<\/strong> v2.x:<\/p>\n<pre><code class=\"language-powershell\">Install-Module -Name PSReadLine -AllowPrerelease -Force<\/code><\/pre>\n<p>If you are using <strong>PowerShellGet<\/strong> v3, you can use the following command:<\/p>\n<pre><code class=\"language-powershell\">Install-PSResource -Name PSReadLine -AllowPrerelease -Force<\/code><\/pre>\n<p>You must include the <strong>Force<\/strong> parameter to install this version side by side with the default\nstable version.<\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Note<\/strong><\/p>You must restart your PowerShell session to use the new version of\n<strong>PSReadLine<\/strong>.<\/div><\/p>\n<h2>Scrollable List View<\/h2>\n<p>A big feature of this prerelease is the scrollable list view. Previously, the <code>ListView<\/code> mode is\nlimited to show up to just 10 results. With this release, <strong>PSReadLine<\/strong> can show up to <strong>50<\/strong>\nresults. The view shows the first 10 results, but now you can use the <kbd>UpArrow<\/kbd> and\n<kbd>DownArrow<\/kbd> keys to scroll the list beyond the first 10 results.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-19885\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/Scrollable.gif\" alt=\"Screenshot showing the scrollable view.\" width=\"1104\" height=\"621\" \/><\/p>\n<p>When you have multiple providers loaded the ordering of predictors is still based on the order that\nyou imported the PowerShell modules. The previous screenshot shows that the\n<a href=\"https:\/\/www.powershellgallery.com\/packages\/Az.Tools.Predictor\/1.1.0\"><code>Az.Tools.Predictor<\/code><\/a> module was imported before the <a href=\"https:\/\/www.powershellgallery.com\/packages\/CompletionPredictor\/0.1.0\"><code>CompletionPredictor<\/code><\/a>.<\/p>\n<p>If the providers return more than 50 results combined, the prediction results are distributed as\nevenly as possible based on the amount each provider returned.<\/p>\n<h3>New key bindings<\/h3>\n<p>Scrolling one line at a time can be slow for large lists. For a faster scrolling, we added new key\nbindings to help navigate the <code>ListView<\/code>.<\/p>\n<table>\n<thead>\n<tr>\n<th>Key Binding<\/th>\n<th>Description<\/th>\n<th>Function<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>PageUp<\/code><\/td>\n<td>Move up a page<\/td>\n<td><code>ScrollDisplayUp<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>PageDown<\/code><\/td>\n<td>Move down a page<\/td>\n<td><code>ScrollDisplayDown<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>Ctrl+PageUp<\/code><\/td>\n<td>Move up to next predictor&#8217;s first result<\/td>\n<td><code>ScrollDisplayUpLine<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>Ctrl+PageDown<\/code><\/td>\n<td>Move down to the next predictor&#8217;s first result<\/td>\n<td><code>ScrollDisplayDownLine<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These key bindings only apply in <code>ListView<\/code>. If <code>ListView<\/code> isn&#8217;t enabled, these key bindings do what\nthey normally do. As with any key binding, you can reconfigure the binding for these functions using\n<code>Set-PSReadLineKeyHandler<\/code>.<\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Note<\/strong><\/p>These functions are bound by default in Windows and Emacs\n<code>EditModes<\/code> but not in VI Mode.<\/div><\/p>\n<h3>Autoadjusting size<\/h3>\n<p>Since we now have the ability to scroll through different results, we can adjust the height of the\n<code>ListView<\/code> results with the shell&#8217;s window height. The maximum size is 10 lines, but it shrinks to 5\nlines if the <code>Console.BufferHeight<\/code> is less than or equal 20 and to 3 lines when the height is less\nthan or equal to 10. If the terminal width or height is too small, <code>ListView<\/code> displays a warning\nmessage that the size is too small.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/AutoAdjust.gif\"><img decoding=\"async\" class=\"alignnone wp-image-19882 size-full\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/AutoAdjust.gif\" alt=\"Animated screenshot showing ListView adjusting its size when the terminal window changes.\" width=\"768\" height=\"276\" \/><\/a><\/p>\n<p>This is particularly helpful when using Azure Cloud Shell, because the default terminal height is\ntoo small to show 10 results.<\/p>\n<h3>Metadata line<\/h3>\n<p>We&#8217;ve also included a new <em>metadata line<\/em> that show the line number of your selection the number of\nresults available from each prediction source. The metadata line changes as you are scroll through\nthe list.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc.png\"><img decoding=\"async\" class=\"alignnone wp-image-19884 size-full\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc.png\" alt=\"Screenshot highlighting the metadata line descriptions.\" width=\"1764\" height=\"700\" srcset=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc.png 1764w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc-300x119.png 300w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc-1024x406.png 1024w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc-768x305.png 768w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/MetadataDesc-1536x610.png 1536w\" sizes=\"(max-width: 1764px) 100vw, 1764px\" \/><\/a><\/p>\n<h2>Additional features<\/h2>\n<h3>Deduplication of prediction results<\/h3>\n<p>As more and more predictors are created, we&#8217;ve noticed a few cases where the same prediction can\ncome from multiple sources. To reduce the repetition of predictions, we&#8217;ve made a fix to remove\nresults returned by the history predictor. This means that if history has a prediction that another\npredictor has, the result is only displayed from the history. This allows for more and different\nresults to be displayed and reduces confusion between two predictions with the same exact syntax.<\/p>\n<h3>Change default color for inline prediction<\/h3>\n<p>We made a minor change to the inline prediction color to make it more easily readable on terminals\nthat don&#8217;t use a pure black background, such as the VS Code terminal. The previous setting of\n<code>dark black<\/code> has been changed to <code>dim white italic<\/code>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/InlineColorChange.png\"><img decoding=\"async\" class=\"alignnone wp-image-19883 size-full\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/InlineColorChange.png\" alt=\"Screenshot showing the new inline predictor color.\" width=\"589\" height=\"95\" srcset=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/InlineColorChange.png 589w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2023\/03\/InlineColorChange-300x48.png 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/a><\/p>\n<h2>Bug fixes and new features<\/h2>\n<p>This release includes the bug fixes and community contributions detailed below. We really appreciate\nand value community contributions!<\/p>\n<ul>\n<li>Handle multi-line description for parameter help content (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3358\">#3358<\/a>)<\/li>\n<li>Update module version in bot messages (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3361\">#3361<\/a>)<\/li>\n<li>Add support for upcasing, downcasing, and capitalizing word (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3365\">#3365<\/a>) (Thanks <a href=\"https:\/\/github.com\/3N4N\">@3N4N<\/a>!)<\/li>\n<li>Fix parameter dynamic help when the help content is specified in ParameterAttribute (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3370\">#3370<\/a>)<\/li>\n<li>No list view prediction when the first line was scrolled up off the buffer (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3372\">#3372<\/a>)<\/li>\n<li>Fix wrong cursor position in menu completion (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3373\">#3373<\/a>)<\/li>\n<li>Fix ViModeIndicator = Cursor for Windows Terminal (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3374\">#3374<\/a>)<\/li>\n<li>Fix the description of CapitalizeWord (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3384\">#3384<\/a>)<\/li>\n<li>Place ViDGChord in the right group (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3422\">#3422<\/a>)<\/li>\n<li>Update the samples in README.md (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3440\">#3440<\/a>, <a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3424\">#3424<\/a>)<\/li>\n<li>Fix some typos in this repository (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3547\">#3547<\/a>) (Thanks <a href=\"https:\/\/github.com\/spaette\">@spaette<\/a>!)<\/li>\n<li>Fix to use the default member color for members (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3450\">#3450<\/a>)<\/li>\n<li>Make tab completion show results whose ListItemText are different by case only (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3456\">#3456<\/a>)\n(Thanks <a href=\"https:\/\/github.com\/dkaszews\">@dkaszews<\/a>!)<\/li>\n<li>Fix the menu completion to better handle the backspace key (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3574\">#3574<\/a>)<\/li>\n<li>Updating Fabric bot (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3540\">#3540<\/a>, <a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3576\">#3576<\/a>)<\/li>\n<li>Use &#8216;Visual Studio 2022&#8217; as the image for appveyor CI (<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/pull\/3594\">#3594<\/a>)<\/li>\n<\/ul>\n<h2>Feedback<\/h2>\n<p>As usual, we welcome feedback about this release! Since this is a beta release, designs and features\nare subject to change. You can submit bugs, feature requests, or questions to the\n<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/issues\">PSReadLine repository<\/a>. Your feedback is greatly appreciated!<\/p>\n<p>Steven Bucher,<\/p>\n<p>PowerShell Team<\/p>\n<p><!-- Link references --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Announcement of PSReadLine 2.3.0-beta0 release and description of the new features and fixes available.<\/p>\n","protected":false},"author":98569,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3168],"class_list":["post-19880","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-powershell","tag-psreadline","post_format-post-format-image"],"acf":[],"blog_post_summary":"<p>Announcement of PSReadLine 2.3.0-beta0 release and description of the new features and fixes available.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/19880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/98569"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=19880"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/19880\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=19880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=19880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=19880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}