From 22bb84c0cb4a1ad4e04c3018ea11b7035b43a2e4 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 17 Sep 2024 12:55:37 -0500 Subject: [PATCH] Move PSReadLine release notes to new article (#11412) * Move PSReadLine release notes to new article * Fix broken links * Fix description --- .../5.1/PSReadLine/About/about_PSReadLine.md | 109 ++--------- .../About/about_PSReadLine_Release_Notes.md | 181 ++++++++++++++++++ reference/5.1/PSReadLine/PSReadLine.md | 16 +- .../7.2/PSReadLine/About/about_PSReadLine.md | 122 +++--------- .../About/about_PSReadLine_Release_Notes.md | 181 ++++++++++++++++++ reference/7.2/PSReadLine/PSReadLine.md | 18 +- .../7.4/PSReadLine/About/about_PSReadLine.md | 122 +++--------- .../About/about_PSReadLine_Release_Notes.md | 181 ++++++++++++++++++ reference/7.4/PSReadLine/PSReadLine.md | 20 +- .../7.5/PSReadLine/About/about_PSReadLine.md | 122 +++--------- .../About/about_PSReadLine_Release_Notes.md | 181 ++++++++++++++++++ reference/7.5/PSReadLine/PSReadLine.md | 20 +- 12 files changed, 858 insertions(+), 415 deletions(-) create mode 100644 reference/5.1/PSReadLine/About/about_PSReadLine_Release_Notes.md create mode 100644 reference/7.2/PSReadLine/About/about_PSReadLine_Release_Notes.md create mode 100644 reference/7.4/PSReadLine/About/about_PSReadLine_Release_Notes.md create mode 100644 reference/7.5/PSReadLine/About/about_PSReadLine_Release_Notes.md diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine.md b/reference/5.1/PSReadLine/About/about_PSReadLine.md index f8cc2f6c994..b0eaea6d321 100644 --- a/reference/5.1/PSReadLine/About/about_PSReadLine.md +++ b/reference/5.1/PSReadLine/About/about_PSReadLine.md @@ -1,7 +1,7 @@ --- description: PSReadLine provides an improved command-line editing experience in the PowerShell console. Locale: en-US -ms.date: 11/14/2023 +ms.date: 09/17/2024 online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_PSReadLine @@ -13,10 +13,22 @@ title: about_PSReadLine PSReadLine provides an improved command-line editing experience in the PowerShell console. +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +For more information about version differences, see +[about_PSReadLine_Release_Notes](about_PSReadLine_Release_Notes.md). + ## Long Description -PowerShell 5.1 ships with PSReadLine 2.0.0. The current version is PSReadLine -2.3.4. The current version of PSReadLine can be installed and used on Windows +The current version of PSReadLine can be installed and used on Windows PowerShell 5.1 and newer. For some features, you need to be running PowerShell 7.2 or higher. @@ -110,7 +122,8 @@ APIs are documented in [about_PSReadLine_Functions][02]. ### Command History -PSReadLine maintains a history file containing all the commands and data you've entered from the command line. The history files are a file named +PSReadLine maintains a history file containing all the commands and data you've +entered from the command line. The history files are a file named `$($host.Name)_history.txt`. On Windows systems the history file is stored at `$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine`. @@ -202,87 +215,6 @@ az account get-access-token --resource=https://app.contoso.com --query accessTok $env:PGPASS = gcloud auth print-access-token ``` -### PSReadLine release history - -There have been many updates to PSReadLine since the version that ships in -Windows PowerShell 5.1. - -- Current release is PSReadLine 2.3.4 -- PowerShell 7.4 ships with PSReadLine 2.3.4 -- PowerShell 7.3 ships with PSReadLine 2.2.6 -- PowerShell 7.2 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 shipped with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 - -For a full list of changes, see the PSReadLine [ChangeLog][04]. - -- **PSReadLine 2.3.4** - -In addition to several bug fixes, this release includes the following -enhancements: - -- Scrollable **ListView** for Predictive IntelliSense - - Autoadjusts the size based on the size of the terminal window - - Can contain up to 50 prediction results - - Dynamic list header that shows the number of results and the current - prediction source -- Improved sensitive history scrubbing to allow retrieving token from `az`, - `gcloud`, and `kubectl` -- Improve the default sensitive history scrubbing to allow safe property access -- Added support for upcasing, downcasing, and capitalizing words -- Make tab completion show results whose `ListItemText` are different by case - only -- Supports the text-object command `` in the VI edit mode -- Change default color for inline prediction to dim -- Add a sample to README for transforming Unicode code point to Unicode char by - `Alt+x` -- Add the TerminateOrphanedConsoleApps option on Windows to kill orphaned - console-attached process that may mess up reading from Console input - -- **PSReadLine 2.2.6** - - In this release, the Predictive IntelliSense feature is enabled by default - depending on the following conditions: - - - If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell - 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` - - If VT is supported and PSReadLine running in PowerShell prior to 7.2, - **PredictionSource** is set to `History` - - If VT isn't supported, **PredictionSource** is set to `None` - -- **PSReadLine 2.2.5** - - Official servicing release with minor bug fixes. - -- **PSReadLine 2.2.2** - - - PSReadLine added two new predictive IntelliSense features: - - Added the **PredictionViewStyle** parameter to allow for the selection of - the new `ListView`. - - Connected PSReadLine to the `CommandPrediction` APIs introduced in - PowerShell 7.2 to allow a user can import a predictor module that can - render the suggestions from a custom source. - - Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for - dynamic help - - Improved the scrubbing of sensitive history items - - Lots of bug fixes and smaller improvements - -- **PSReadLine 2.1.0** - - This release rolls up the following enhancements added since the 2.0.4 - release: - - - Add Predictive IntelliSense suggestions from the command history - - Many bug fixes and API enhancements - -- **PSReadLine 2.0.4** - - This release rolls up the following enhancements added since the 2.0.0 - release: - - - Added the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow - searching for specific key bindings - ### Feedback & contributing to PSReadLine [PSReadLine on GitHub][03] @@ -291,11 +223,10 @@ Feel free to submit a pull request or submit feedback on the GitHub page. ## See Also -- PSReadLine is heavily influenced by the GNU [readline][05] library. +- PSReadLine is heavily influenced by the GNU [readline][04] library. -[01]: /powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history +[01]: xref:PSReadLine.Set-PSReadLineOption#example-7-use-historyhandler-to-filter-commands-added-to-history [02]: about_PSReadLine_Functions.md [03]: https://github.com/PowerShell/PSReadLine -[04]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt -[05]: https://tiswww.case.edu/php/chet/readline/rltop.html +[04]: https://tiswww.case.edu/php/chet/readline/rltop.html diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine_Release_Notes.md b/reference/5.1/PSReadLine/About/about_PSReadLine_Release_Notes.md new file mode 100644 index 00000000000..5151bdd8fa6 --- /dev/null +++ b/reference/5.1/PSReadLine/About/about_PSReadLine_Release_Notes.md @@ -0,0 +1,181 @@ +--- +description: This article contains the list of changes for each released version of PSReadLine. +Locale: en-US +ms.date: 09/17/2024 +online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_release_notes?view=powershell-5.1&WT.mc_id=ps-gethelp +schema: 2.0.0 +title: about_PSReadLine_Release_Notes +--- +# about_PSReadLine_Release_Notes + +This is a summary of changes to the **PSReadLine** module. For a full list of +changes, see the **PSReadLine** [ChangeLog][01]. + +- Current preview: v2.4.0-beta0 +- Current stable release: v2.3.5 + +## PSReadLine release history + +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +## Release Notes + +### v2.4.0-beta0 - 2024-03-01 + +- Fix copying text to system clipboard on Linux using `xclip` +- Tab completion uses the correct directory separator for the platform +- PowerShell version 5.1 is now the minimum supported version +- Get the Windows keyboard layout from the parent terminal process +- Fix a few VI key handlers to correctly close the edit group +- Read the history file in the streaming way to handle large files efficiently + +### v2.3.5 - 2024-04-02 + +This is a servicing release that excludes test components from SBOM generation. + +### v2.3.4 - 2023-10-02 + +In addition to several bug fixes, this release includes the following +enhancements: + +- Scrollable **ListView** for Predictive IntelliSense + - Autoadjusts the size based on the size of the terminal window + - Can contain up to 50 prediction results + - Dynamic list header that shows the number of results and the current + prediction source + - Show tooltips in the prediction list view +- Improved sensitive history scrubbing to allow retrieving token from `az`, + `gcloud`, and `kubectl` +- Improve the default sensitive history scrubbing to allow safe property access +- Added support for upcasing, downcasing, and capitalizing words +- Make tab completion show results whose `ListItemText` are different by case + only +- Supports the text-object command `` in the VI edit mode +- Change default color for inline prediction to dim +- Add a sample to README for transforming Unicode code point to Unicode char by + `Alt+x` +- Add the `TerminateOrphanedConsoleApps` option on Windows to kill orphaned + console-attached process that may mess up reading from Console input +- De-duplicate prediction results with the history results +- Make tab completion show results whose `ListItemText` are different by case only +- Add support for upcasing, downcasing, and capitalizing word +- Handle multi-line description for parameter help content + +### v2.2.6 - 2022-06-27 + +In this release, the Predictive IntelliSense feature is enabled by default +depending on the following conditions: + +- If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell + 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` +- If VT is supported and PSReadLine running in PowerShell prior to 7.2, + **PredictionSource** is set to `History` +- If VT isn't supported, **PredictionSource** is set to `None` + +### v2.2.5 - 2022-05-03 + +Official servicing release with minor bug fixes. + +### v2.2.3 - 2022-04-20 + +- Respect cancellation in `ReadOneOrMoreKeys()` + +### v2.2.2 - 2022-02-22 + +- PSReadLine added two new predictive IntelliSense features: + - Added the **PredictionViewStyle** parameter to allow for the selection of + the new `ListView`. + - Connected PSReadLine to the `CommandPrediction` APIs introduced in + PowerShell 7.2 to allow a user can import a predictor module that can + render the suggestions from a custom source. +- Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for + dynamic help +- Improved the scrubbing of sensitive history items +- Make `Ctrl+r` and `Ctrl+s` in `Vi` edit mode work the same way as in `Emacs` + edit mode +- Make `d0` to delete to the start of the current logical line in a multiline + buffer in VI mode +- Use `d^` to delete from the first non-blank character of a logical line +- VI Mode: `Undo` now leaves the cursor under the position at the start of the + deletion +- Make `HistorySearchBackward` and `HistorySearchForward` able to navigate the + list view +- Add the `SelectCommandArgument` bind-able function +- Remove `LineIsMultiline` in favor of multi-line agnostic algorithms +- Lots of bug fixes and smaller improvements + +### v2.1.0 - 2020-11-02 + +This release rolls up the following enhancements added since the 2.0.4 +release: + +- Add Predictive IntelliSense suggestions from the command history +- Many bug fixes and API enhancements + +### v2.0.4 - 2020-08-05 + +- vi-mode: Make `dd` deletes the logical line instead of the entire buffer +- vi-mode: Add `dG` to delete to the end of multiline buffer +- vi-mode: `dd` now handles single line or multiline buffers consistently +- vi-mode: Make `D` and `d$` delete to the end of the current logical line +- vi-mode - Make `dj` delete the current and next `n` logical lines +- vi-mode: Use `dk` to delete the previous `n` logical lines and the current + logical line in a multi-line buffer +- vi-mode: Add `dgg` to delete from the beginning of the buffer to the current + logical line +- Rename `PredictionColor` to `InlinePredictionColor` +- Allow `MaximumHistoryCount` to be set from user's profile +- Add the parameter `-PredictionSource` to `Set-PSReadLineOption`, with the options `None` and `History` +- Make the functions `AcceptSuggestion` and `AcceptNextSuggestionWord` bindable +- Relax the sensitive words we filter by changing `key` to `apikey` to reduce false positives +- Make `ViForwardChar` able to accept suggestions +- Expose `ViBackwardChar` and `ViForwardChar` as bindable functions + +### v2.0.3 - 2020-07-22 + +- Minor bug fixes + +### v2.0.2 - 2020-06-05 + +- Run script in local scope to make PSReadLine works in PSES in + `ConstrainedLanguageMode` +- Other bug fixes + +### v2.0.1 - 2020-04-01 + +- Add the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow searching + for specific key bindings +- Other minor bug fixes + +### v2.0.0 - 2020-02-11 + +- Allow `InsertPairedBraces` to wrap selected text +- Lots of bug fixes and smaller improvements +- Filter sensitive history items and avoid writing them to the history file +- Supporting line-wise yanks, including paste and undo +- Make `y0` yank up to the start of the logical line in `VI` mode +- Add API to detect if the screen reader is active +- Make `PageUp/PageDown` and `CtrlPageUp/CtrlPageDown` windows only +- Add script block vi mode indicator option +- Support vi mode `G` and `gg` movements in multi-line buffers +- Supports `_` and `$` to move to the beginning and end of the logical line in + vi mode +- Add `xtermjs` keybindings +- Support `Ctrl+u` in vi insert mode +- Enable `Ctrl+c` on non-Windows +- Interactive filtering during menu complete +- `Shift+Insert` bound to Paste in Windows mode +- `Ctrl+t` bound to `SwapCharacters` in Emacs mode +- `Ctrl+x,Ctrl+e` bound to `ViEditVisually` in Emacs +- `HistoryNoDuplicates` is now on by default + + +[01]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt diff --git a/reference/5.1/PSReadLine/PSReadLine.md b/reference/5.1/PSReadLine/PSReadLine.md index ed87d7138f8..fc3aa9200d0 100644 --- a/reference/5.1/PSReadLine/PSReadLine.md +++ b/reference/5.1/PSReadLine/PSReadLine.md @@ -4,7 +4,7 @@ Help Version: 5.2.0.0 Locale: en-US Module Guid: 5714753b-2afd-4492-a5fd-01d9e2cff8b5 Module Name: PSReadLine -ms.date: 12/04/2023 +ms.date: 09/17/2024 schema: 2.0.0 title: PSReadLine --- @@ -18,11 +18,15 @@ editing environment in PowerShell. There have been many updates to PSReadLine since the version that ships in Windows PowerShell 5.1. -- PowerShell 7.4.0 ships with PSReadLine 2.3.4 -- PowerShell 7.3.0 ships with PSReadLine 2.2.6 -- PowerShell 7.2.5 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 ships with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +For more information about version differences, see +[about_PSReadLine_Release_Notes](about/about_PSReadLine_Release_Notes.md). These articles document version 2.0.0 of PSReadLine. diff --git a/reference/7.2/PSReadLine/About/about_PSReadLine.md b/reference/7.2/PSReadLine/About/about_PSReadLine.md index 401fd60d207..6f30570fe80 100644 --- a/reference/7.2/PSReadLine/About/about_PSReadLine.md +++ b/reference/7.2/PSReadLine/About/about_PSReadLine.md @@ -1,7 +1,7 @@ --- description: PSReadLine provides an improved command-line editing experience in the PowerShell console. Locale: en-US -ms.date: 11/14/2023 +ms.date: 09/17/2024 online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_PSReadLine @@ -13,10 +13,22 @@ title: about_PSReadLine PSReadLine provides an improved command-line editing experience in the PowerShell console. +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +For more information about version differences, see +[about_PSReadLine_Release_Notes](about_PSReadLine_Release_Notes.md). + ## Long Description -PowerShell 7.2 ships with PSReadLine 2.1.0. The current version is PSReadLine -2.3.4. The current version of PSReadLine can be installed and used on Windows +The current version of PSReadLine can be installed and used on Windows PowerShell 5.1 and newer. For some features, you need to be running PowerShell 7.2 or higher. @@ -79,15 +91,10 @@ To disable Predictive IntelliSense, just run: Set-PSReadLineOption -PredictionSource None ``` -> [!NOTE] -> Predictive IntelliSense is enabled by default in PSReadLine 2.2.6. For more -> information see, the [PSReadLine release history][02] in the **Notes** -> section below. - ## Custom Key Bindings PSReadLine supports custom key bindings using the `Set-PSReadLineKeyHandler` -cmdlet. Most custom key bindings call one of the [bindable functions][03], for +cmdlet. Most custom key bindings call one of the [bindable functions][02], for example ```powershell @@ -144,7 +151,7 @@ You can see many more examples in the file `SamplePSReadLineProfile.ps1`, which is installed in the **PSReadLine** module folder. Most key bindings use some helper functions for editing the command line. Those -APIs are documented in [about_PSReadLine_Functions][03]. +APIs are documented in [about_PSReadLine_Functions][02]. ## Notes @@ -245,101 +252,18 @@ az account get-access-token --resource=https://app.contoso.com --query accessTok $env:PGPASS = gcloud auth print-access-token ``` -### PSReadLine release history - -There have been many updates to PSReadLine since the version that ships in -Windows PowerShell 5.1. - -- Current release is PSReadLine 2.3.4 -- PowerShell 7.4 ships with PSReadLine 2.3.4 -- PowerShell 7.3 ships with PSReadLine 2.2.6 -- PowerShell 7.2 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 shipped with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 - -For a full list of changes, see the PSReadLine [ChangeLog][05]. - -- **PSReadLine 2.3.4** - -In addition to several bug fixes, this release includes the following -enhancements: - -- Scrollable **ListView** for Predictive IntelliSense - - Autoadjusts the size based on the size of the terminal window - - Can contain up to 50 prediction results - - Dynamic list header that shows the number of results and the current - prediction source -- Improved sensitive history scrubbing to allow retrieving token from `az`, - `gcloud`, and `kubectl` -- Improve the default sensitive history scrubbing to allow safe property access -- Added support for upcasing, downcasing, and capitalizing words -- Make tab completion show results whose `ListItemText` are different by case - only -- Supports the text-object command `` in the VI edit mode -- Change default color for inline prediction to dim -- Add a sample to README for transforming Unicode code point to Unicode char by - `Alt+x` -- Add the TerminateOrphanedConsoleApps option on Windows to kill orphaned - console-attached process that may mess up reading from Console input - -- **PSReadLine 2.2.6** - - In this release, the Predictive IntelliSense feature is enabled by default - depending on the following conditions: - - - If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell - 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` - - If VT is supported and PSReadLine running in PowerShell prior to 7.2, - **PredictionSource** is set to `History` - - If VT isn't supported, **PredictionSource** is set to `None` - -- **PSReadLine 2.2.5** - - Official servicing release with minor bug fixes. - -- **PSReadLine 2.2.2** - - - PSReadLine added two new predictive IntelliSense features: - - Added the **PredictionViewStyle** parameter to allow for the selection of - the new `ListView`. - - Connected PSReadLine to the `CommandPrediction` APIs introduced in - PowerShell 7.2 to allow a user can import a predictor module that can - render the suggestions from a custom source. - - Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for - dynamic help - - Improved the scrubbing of sensitive history items - - Lots of bug fixes and smaller improvements - -- **PSReadLine 2.1.0** - - This release rolls up the following enhancements added since the 2.0.4 - release: - - - Add Predictive IntelliSense suggestions from the command history - - Many bug fixes and API enhancements - -- **PSReadLine 2.0.4** - - This release rolls up the following enhancements added since the 2.0.0 - release: - - - Added the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow - searching for specific key bindings - ### Feedback & contributing to PSReadLine -[PSReadLine on GitHub][04] +[PSReadLine on GitHub][03] Feel free to submit a pull request or submit feedback on the GitHub page. ## See Also -- PSReadLine is heavily influenced by the GNU [readline][06] library. +- PSReadLine is heavily influenced by the GNU [readline][04] library. -[01]: /powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history -[02]: #psreadline-release-history -[03]: about_PSReadLine_Functions.md -[04]: https://github.com/PowerShell/PSReadLine -[05]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt -[06]: https://tiswww.case.edu/php/chet/readline/rltop.html +[01]: xref:PSReadLine.Set-PSReadLineOption#example-7-use-historyhandler-to-filter-commands-added-to-history +[02]: about_PSReadLine_Functions.md +[03]: https://github.com/PowerShell/PSReadLine +[04]: https://tiswww.case.edu/php/chet/readline/rltop.html diff --git a/reference/7.2/PSReadLine/About/about_PSReadLine_Release_Notes.md b/reference/7.2/PSReadLine/About/about_PSReadLine_Release_Notes.md new file mode 100644 index 00000000000..568b14343bb --- /dev/null +++ b/reference/7.2/PSReadLine/About/about_PSReadLine_Release_Notes.md @@ -0,0 +1,181 @@ +--- +description: This article contains the list of changes for each released version of PSReadLine. +Locale: en-US +ms.date: 09/17/2024 +online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_release_notes?view=powershell-7.2&WT.mc_id=ps-gethelp +schema: 2.0.0 +title: about_PSReadLine_Release_Notes +--- +# about_PSReadLine_Release_Notes + +This is a summary of changes to the **PSReadLine** module. For a full list of +changes, see the **PSReadLine** [ChangeLog][01]. + +- Current preview: v2.4.0-beta0 +- Current stable release: v2.3.5 + +## PSReadLine release history + +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +## Release Notes + +### v2.4.0-beta0 - 2024-03-01 + +- Fix copying text to system clipboard on Linux using `xclip` +- Tab completion uses the correct directory separator for the platform +- PowerShell version 5.1 is now the minimum supported version +- Get the Windows keyboard layout from the parent terminal process +- Fix a few VI key handlers to correctly close the edit group +- Read the history file in the streaming way to handle large files efficiently + +### v2.3.5 - 2024-04-02 + +This is a servicing release that excludes test components from SBOM generation. + +### v2.3.4 - 2023-10-02 + +In addition to several bug fixes, this release includes the following +enhancements: + +- Scrollable **ListView** for Predictive IntelliSense + - Autoadjusts the size based on the size of the terminal window + - Can contain up to 50 prediction results + - Dynamic list header that shows the number of results and the current + prediction source + - Show tooltips in the prediction list view +- Improved sensitive history scrubbing to allow retrieving token from `az`, + `gcloud`, and `kubectl` +- Improve the default sensitive history scrubbing to allow safe property access +- Added support for upcasing, downcasing, and capitalizing words +- Make tab completion show results whose `ListItemText` are different by case + only +- Supports the text-object command `` in the VI edit mode +- Change default color for inline prediction to dim +- Add a sample to README for transforming Unicode code point to Unicode char by + `Alt+x` +- Add the `TerminateOrphanedConsoleApps` option on Windows to kill orphaned + console-attached process that may mess up reading from Console input +- De-duplicate prediction results with the history results +- Make tab completion show results whose `ListItemText` are different by case only +- Add support for upcasing, downcasing, and capitalizing word +- Handle multi-line description for parameter help content + +### v2.2.6 - 2022-06-27 + +In this release, the Predictive IntelliSense feature is enabled by default +depending on the following conditions: + +- If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell + 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` +- If VT is supported and PSReadLine running in PowerShell prior to 7.2, + **PredictionSource** is set to `History` +- If VT isn't supported, **PredictionSource** is set to `None` + +### v2.2.5 - 2022-05-03 + +Official servicing release with minor bug fixes. + +### v2.2.3 - 2022-04-20 + +- Respect cancellation in `ReadOneOrMoreKeys()` + +### v2.2.2 - 2022-02-22 + +- PSReadLine added two new predictive IntelliSense features: + - Added the **PredictionViewStyle** parameter to allow for the selection of + the new `ListView`. + - Connected PSReadLine to the `CommandPrediction` APIs introduced in + PowerShell 7.2 to allow a user can import a predictor module that can + render the suggestions from a custom source. +- Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for + dynamic help +- Improved the scrubbing of sensitive history items +- Make `Ctrl+r` and `Ctrl+s` in `Vi` edit mode work the same way as in `Emacs` + edit mode +- Make `d0` to delete to the start of the current logical line in a multiline + buffer in VI mode +- Use `d^` to delete from the first non-blank character of a logical line +- VI Mode: `Undo` now leaves the cursor under the position at the start of the + deletion +- Make `HistorySearchBackward` and `HistorySearchForward` able to navigate the + list view +- Add the `SelectCommandArgument` bind-able function +- Remove `LineIsMultiline` in favor of multi-line agnostic algorithms +- Lots of bug fixes and smaller improvements + +### v2.1.0 - 2020-11-02 + +This release rolls up the following enhancements added since the 2.0.4 +release: + +- Add Predictive IntelliSense suggestions from the command history +- Many bug fixes and API enhancements + +### v2.0.4 - 2020-08-05 + +- vi-mode: Make `dd` deletes the logical line instead of the entire buffer +- vi-mode: Add `dG` to delete to the end of multiline buffer +- vi-mode: `dd` now handles single line or multiline buffers consistently +- vi-mode: Make `D` and `d$` delete to the end of the current logical line +- vi-mode - Make `dj` delete the current and next `n` logical lines +- vi-mode: Use `dk` to delete the previous `n` logical lines and the current + logical line in a multi-line buffer +- vi-mode: Add `dgg` to delete from the beginning of the buffer to the current + logical line +- Rename `PredictionColor` to `InlinePredictionColor` +- Allow `MaximumHistoryCount` to be set from user's profile +- Add the parameter `-PredictionSource` to `Set-PSReadLineOption`, with the options `None` and `History` +- Make the functions `AcceptSuggestion` and `AcceptNextSuggestionWord` bindable +- Relax the sensitive words we filter by changing `key` to `apikey` to reduce false positives +- Make `ViForwardChar` able to accept suggestions +- Expose `ViBackwardChar` and `ViForwardChar` as bindable functions + +### v2.0.3 - 2020-07-22 + +- Minor bug fixes + +### v2.0.2 - 2020-06-05 + +- Run script in local scope to make PSReadLine works in PSES in + `ConstrainedLanguageMode` +- Other bug fixes + +### v2.0.1 - 2020-04-01 + +- Add the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow searching + for specific key bindings +- Other minor bug fixes + +### v2.0.0 - 2020-02-11 + +- Allow `InsertPairedBraces` to wrap selected text +- Lots of bug fixes and smaller improvements +- Filter sensitive history items and avoid writing them to the history file +- Supporting line-wise yanks, including paste and undo +- Make `y0` yank up to the start of the logical line in `VI` mode +- Add API to detect if the screen reader is active +- Make `PageUp/PageDown` and `CtrlPageUp/CtrlPageDown` windows only +- Add script block vi mode indicator option +- Support vi mode `G` and `gg` movements in multi-line buffers +- Supports `_` and `$` to move to the beginning and end of the logical line in + vi mode +- Add `xtermjs` keybindings +- Support `Ctrl+u` in vi insert mode +- Enable `Ctrl+c` on non-Windows +- Interactive filtering during menu complete +- `Shift+Insert` bound to Paste in Windows mode +- `Ctrl+t` bound to `SwapCharacters` in Emacs mode +- `Ctrl+x,Ctrl+e` bound to `ViEditVisually` in Emacs +- `HistoryNoDuplicates` is now on by default + + +[01]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt diff --git a/reference/7.2/PSReadLine/PSReadLine.md b/reference/7.2/PSReadLine/PSReadLine.md index 7af1d932d2f..327ca316ec5 100644 --- a/reference/7.2/PSReadLine/PSReadLine.md +++ b/reference/7.2/PSReadLine/PSReadLine.md @@ -4,7 +4,7 @@ Help Version: 7.2.0.0 Locale: en-US Module Guid: 5714753b-2afd-4492-a5fd-01d9e2cff8b5 Module Name: PSReadLine -ms.date: 12/04/2023 +ms.date: 09/17/2024 schema: 2.0.0 title: PSReadLine --- @@ -18,11 +18,15 @@ editing environment in PowerShell. There have been many updates to PSReadLine since the version that ships in Windows PowerShell 5.1. -- PowerShell 7.4.0 ships with PSReadLine 2.3.4 -- PowerShell 7.3.0 ships with PSReadLine 2.2.6 -- PowerShell 7.2.5 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 ships with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +For more information about version differences, see +[about_PSReadLine_Release_Notes](about/about_PSReadLine_Release_Notes.md). These articles document version 2.1.0 of PSReadLine. @@ -39,7 +43,7 @@ These articles document version 2.1.0 of PSReadLine. The main entry point for PSReadLine. ### [Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md) -Gets the bound key functions for the PSReadLine module. +Gets the key bindings for the PSReadLine module. ### [Get-PSReadLineOption](Get-PSReadLineOption.md) Gets values for the options that can be configured. diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine.md b/reference/7.4/PSReadLine/About/about_PSReadLine.md index 7729d83538b..ccbd4914643 100644 --- a/reference/7.4/PSReadLine/About/about_PSReadLine.md +++ b/reference/7.4/PSReadLine/About/about_PSReadLine.md @@ -1,7 +1,7 @@ --- description: PSReadLine provides an improved command-line editing experience in the PowerShell console. Locale: en-US -ms.date: 11/14/2023 +ms.date: 09/17/2024 online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_PSReadLine @@ -13,10 +13,22 @@ title: about_PSReadLine PSReadLine provides an improved command-line editing experience in the PowerShell console. +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +For more information about version differences, see +[about_PSReadLine_Release_Notes](about_PSReadLine_Release_Notes.md). + ## Long Description -PowerShell 7.4 ships with PSReadLine 2.3.4. The current version is PSReadLine -2.3.4. The current version of PSReadLine can be installed and used on Windows +The current version of PSReadLine can be installed and used on Windows PowerShell 5.1 and newer. For some features, you need to be running PowerShell 7.2 or higher. @@ -79,15 +91,10 @@ To disable Predictive IntelliSense, just run: Set-PSReadLineOption -PredictionSource None ``` -> [!NOTE] -> Predictive IntelliSense is enabled by default in PSReadLine 2.2.6. For more -> information see, the [PSReadLine release history][02] in the **Notes** -> section below. - ## Custom Key Bindings PSReadLine supports custom key bindings using the `Set-PSReadLineKeyHandler` -cmdlet. Most custom key bindings call one of the [bindable functions][03], for +cmdlet. Most custom key bindings call one of the [bindable functions][02], for example ```powershell @@ -144,7 +151,7 @@ You can see many more examples in the file `SamplePSReadLineProfile.ps1`, which is installed in the **PSReadLine** module folder. Most key bindings use some helper functions for editing the command line. Those -APIs are documented in [about_PSReadLine_Functions][03]. +APIs are documented in [about_PSReadLine_Functions][02]. ## Notes @@ -245,101 +252,18 @@ az account get-access-token --resource=https://app.contoso.com --query accessTok $env:PGPASS = gcloud auth print-access-token ``` -### PSReadLine release history - -There have been many updates to PSReadLine since the version that ships in -Windows PowerShell 5.1. - -- Current release is PSReadLine 2.3.4 -- PowerShell 7.4 ships with PSReadLine 2.3.4 -- PowerShell 7.3 ships with PSReadLine 2.2.6 -- PowerShell 7.2 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 shipped with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 - -For a full list of changes, see the PSReadLine [ChangeLog][05]. - -- **PSReadLine 2.3.4** - -In addition to several bug fixes, this release includes the following -enhancements: - -- Scrollable **ListView** for Predictive IntelliSense - - Autoadjusts the size based on the size of the terminal window - - Can contain up to 50 prediction results - - Dynamic list header that shows the number of results and the current - prediction source -- Improved sensitive history scrubbing to allow retrieving token from `az`, - `gcloud`, and `kubectl` -- Improve the default sensitive history scrubbing to allow safe property access -- Added support for upcasing, downcasing, and capitalizing words -- Make tab completion show results whose `ListItemText` are different by case - only -- Supports the text-object command `` in the VI edit mode -- Change default color for inline prediction to dim -- Add a sample to README for transforming Unicode code point to Unicode char by - `Alt+x` -- Add the TerminateOrphanedConsoleApps option on Windows to kill orphaned - console-attached process that may mess up reading from Console input - -- **PSReadLine 2.2.6** - - In this release, the Predictive IntelliSense feature is enabled by default - depending on the following conditions: - - - If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell - 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` - - If VT is supported and PSReadLine running in PowerShell prior to 7.2, - **PredictionSource** is set to `History` - - If VT isn't supported, **PredictionSource** is set to `None` - -- **PSReadLine 2.2.5** - - Official servicing release with minor bug fixes. - -- **PSReadLine 2.2.2** - - - PSReadLine added two new predictive IntelliSense features: - - Added the **PredictionViewStyle** parameter to allow for the selection of - the new `ListView`. - - Connected PSReadLine to the `CommandPrediction` APIs introduced in - PowerShell 7.2 to allow a user can import a predictor module that can - render the suggestions from a custom source. - - Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for - dynamic help - - Improved the scrubbing of sensitive history items - - Lots of bug fixes and smaller improvements - -- **PSReadLine 2.1.0** - - This release rolls up the following enhancements added since the 2.0.4 - release: - - - Add Predictive IntelliSense suggestions from the command history - - Many bug fixes and API enhancements - -- **PSReadLine 2.0.4** - - This release rolls up the following enhancements added since the 2.0.0 - release: - - - Added the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow - searching for specific key bindings - ### Feedback & contributing to PSReadLine -[PSReadLine on GitHub][04] +[PSReadLine on GitHub][03] Feel free to submit a pull request or submit feedback on the GitHub page. ## See Also -- PSReadLine is heavily influenced by the GNU [readline][06] library. +- PSReadLine is heavily influenced by the GNU [readline][04] library. -[01]: /powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history -[02]: #psreadline-release-history -[03]: about_PSReadLine_Functions.md -[04]: https://github.com/PowerShell/PSReadLine -[05]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt -[06]: https://tiswww.case.edu/php/chet/readline/rltop.html +[01]: xref:PSReadLine.Set-PSReadLineOption#example-7-use-historyhandler-to-filter-commands-added-to-history +[02]: about_PSReadLine_Functions.md +[03]: https://github.com/PowerShell/PSReadLine +[04]: https://tiswww.case.edu/php/chet/readline/rltop.html diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine_Release_Notes.md b/reference/7.4/PSReadLine/About/about_PSReadLine_Release_Notes.md new file mode 100644 index 00000000000..4a28bf5d16d --- /dev/null +++ b/reference/7.4/PSReadLine/About/about_PSReadLine_Release_Notes.md @@ -0,0 +1,181 @@ +--- +description: This article contains the list of changes for each released version of PSReadLine. +Locale: en-US +ms.date: 09/17/2024 +online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_release_notes?view=powershell-7.4&WT.mc_id=ps-gethelp +schema: 2.0.0 +title: about_PSReadLine_Release_Notes +--- +# about_PSReadLine_Release_Notes + +This is a summary of changes to the **PSReadLine** module. For a full list of +changes, see the **PSReadLine** [ChangeLog][01]. + +- Current preview: v2.4.0-beta0 +- Current stable release: v2.3.5 + +## PSReadLine release history + +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +## Release Notes + +### v2.4.0-beta0 - 2024-03-01 + +- Fix copying text to system clipboard on Linux using `xclip` +- Tab completion uses the correct directory separator for the platform +- PowerShell version 5.1 is now the minimum supported version +- Get the Windows keyboard layout from the parent terminal process +- Fix a few VI key handlers to correctly close the edit group +- Read the history file in the streaming way to handle large files efficiently + +### v2.3.5 - 2024-04-02 + +This is a servicing release that excludes test components from SBOM generation. + +### v2.3.4 - 2023-10-02 + +In addition to several bug fixes, this release includes the following +enhancements: + +- Scrollable **ListView** for Predictive IntelliSense + - Autoadjusts the size based on the size of the terminal window + - Can contain up to 50 prediction results + - Dynamic list header that shows the number of results and the current + prediction source + - Show tooltips in the prediction list view +- Improved sensitive history scrubbing to allow retrieving token from `az`, + `gcloud`, and `kubectl` +- Improve the default sensitive history scrubbing to allow safe property access +- Added support for upcasing, downcasing, and capitalizing words +- Make tab completion show results whose `ListItemText` are different by case + only +- Supports the text-object command `` in the VI edit mode +- Change default color for inline prediction to dim +- Add a sample to README for transforming Unicode code point to Unicode char by + `Alt+x` +- Add the `TerminateOrphanedConsoleApps` option on Windows to kill orphaned + console-attached process that may mess up reading from Console input +- De-duplicate prediction results with the history results +- Make tab completion show results whose `ListItemText` are different by case only +- Add support for upcasing, downcasing, and capitalizing word +- Handle multi-line description for parameter help content + +### v2.2.6 - 2022-06-27 + +In this release, the Predictive IntelliSense feature is enabled by default +depending on the following conditions: + +- If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell + 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` +- If VT is supported and PSReadLine running in PowerShell prior to 7.2, + **PredictionSource** is set to `History` +- If VT isn't supported, **PredictionSource** is set to `None` + +### v2.2.5 - 2022-05-03 + +Official servicing release with minor bug fixes. + +### v2.2.3 - 2022-04-20 + +- Respect cancellation in `ReadOneOrMoreKeys()` + +### v2.2.2 - 2022-02-22 + +- PSReadLine added two new predictive IntelliSense features: + - Added the **PredictionViewStyle** parameter to allow for the selection of + the new `ListView`. + - Connected PSReadLine to the `CommandPrediction` APIs introduced in + PowerShell 7.2 to allow a user can import a predictor module that can + render the suggestions from a custom source. +- Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for + dynamic help +- Improved the scrubbing of sensitive history items +- Make `Ctrl+r` and `Ctrl+s` in `Vi` edit mode work the same way as in `Emacs` + edit mode +- Make `d0` to delete to the start of the current logical line in a multiline + buffer in VI mode +- Use `d^` to delete from the first non-blank character of a logical line +- VI Mode: `Undo` now leaves the cursor under the position at the start of the + deletion +- Make `HistorySearchBackward` and `HistorySearchForward` able to navigate the + list view +- Add the `SelectCommandArgument` bind-able function +- Remove `LineIsMultiline` in favor of multi-line agnostic algorithms +- Lots of bug fixes and smaller improvements + +### v2.1.0 - 2020-11-02 + +This release rolls up the following enhancements added since the 2.0.4 +release: + +- Add Predictive IntelliSense suggestions from the command history +- Many bug fixes and API enhancements + +### v2.0.4 - 2020-08-05 + +- vi-mode: Make `dd` deletes the logical line instead of the entire buffer +- vi-mode: Add `dG` to delete to the end of multiline buffer +- vi-mode: `dd` now handles single line or multiline buffers consistently +- vi-mode: Make `D` and `d$` delete to the end of the current logical line +- vi-mode - Make `dj` delete the current and next `n` logical lines +- vi-mode: Use `dk` to delete the previous `n` logical lines and the current + logical line in a multi-line buffer +- vi-mode: Add `dgg` to delete from the beginning of the buffer to the current + logical line +- Rename `PredictionColor` to `InlinePredictionColor` +- Allow `MaximumHistoryCount` to be set from user's profile +- Add the parameter `-PredictionSource` to `Set-PSReadLineOption`, with the options `None` and `History` +- Make the functions `AcceptSuggestion` and `AcceptNextSuggestionWord` bindable +- Relax the sensitive words we filter by changing `key` to `apikey` to reduce false positives +- Make `ViForwardChar` able to accept suggestions +- Expose `ViBackwardChar` and `ViForwardChar` as bindable functions + +### v2.0.3 - 2020-07-22 + +- Minor bug fixes + +### v2.0.2 - 2020-06-05 + +- Run script in local scope to make PSReadLine works in PSES in + `ConstrainedLanguageMode` +- Other bug fixes + +### v2.0.1 - 2020-04-01 + +- Add the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow searching + for specific key bindings +- Other minor bug fixes + +### v2.0.0 - 2020-02-11 + +- Allow `InsertPairedBraces` to wrap selected text +- Lots of bug fixes and smaller improvements +- Filter sensitive history items and avoid writing them to the history file +- Supporting line-wise yanks, including paste and undo +- Make `y0` yank up to the start of the logical line in `VI` mode +- Add API to detect if the screen reader is active +- Make `PageUp/PageDown` and `CtrlPageUp/CtrlPageDown` windows only +- Add script block vi mode indicator option +- Support vi mode `G` and `gg` movements in multi-line buffers +- Supports `_` and `$` to move to the beginning and end of the logical line in + vi mode +- Add `xtermjs` keybindings +- Support `Ctrl+u` in vi insert mode +- Enable `Ctrl+c` on non-Windows +- Interactive filtering during menu complete +- `Shift+Insert` bound to Paste in Windows mode +- `Ctrl+t` bound to `SwapCharacters` in Emacs mode +- `Ctrl+x,Ctrl+e` bound to `ViEditVisually` in Emacs +- `HistoryNoDuplicates` is now on by default + + +[01]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt diff --git a/reference/7.4/PSReadLine/PSReadLine.md b/reference/7.4/PSReadLine/PSReadLine.md index fa79fa1e58d..1600fd3e89e 100644 --- a/reference/7.4/PSReadLine/PSReadLine.md +++ b/reference/7.4/PSReadLine/PSReadLine.md @@ -4,7 +4,7 @@ Help Version: 7.4.0.0 Locale: en-US Module Guid: 5714753b-2afd-4492-a5fd-01d9e2cff8b5 Module Name: PSReadLine -ms.date: 12/04/2023 +ms.date: 09/17/2024 schema: 2.0.0 title: PSReadLine --- @@ -18,13 +18,17 @@ editing environment in PowerShell. There have been many updates to PSReadLine since the version that ships in Windows PowerShell 5.1. -- PowerShell 7.4.0 ships with PSReadLine 2.3.4 -- PowerShell 7.3.0 ships with PSReadLine 2.2.6 -- PowerShell 7.2.5 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 ships with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 -These articles document version 2.3.4 of PSReadLine. +For more information about version differences, see +[about_PSReadLine_Release_Notes](about/about_PSReadLine_Release_Notes.md). + +These articles document version 2.3.5 of PSReadLine. > [!NOTE] > Beginning with PowerShell 7.0, PowerShell skips auto-loading PSReadLine on @@ -39,7 +43,7 @@ These articles document version 2.3.4 of PSReadLine. The main entry point for PSReadLine. ### [Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md) -Gets the bound key functions for the PSReadLine module. +Gets the key bindings for the PSReadLine module. ### [Get-PSReadLineOption](Get-PSReadLineOption.md) Gets values for the options that can be configured. diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine.md b/reference/7.5/PSReadLine/About/about_PSReadLine.md index 13a9aece7a0..ef38bbed273 100644 --- a/reference/7.5/PSReadLine/About/about_PSReadLine.md +++ b/reference/7.5/PSReadLine/About/about_PSReadLine.md @@ -1,7 +1,7 @@ --- description: PSReadLine provides an improved command-line editing experience in the PowerShell console. Locale: en-US -ms.date: 11/14/2023 +ms.date: 09/17/2024 online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_PSReadLine @@ -13,10 +13,22 @@ title: about_PSReadLine PSReadLine provides an improved command-line editing experience in the PowerShell console. +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +For more information about version differences, see +[about_PSReadLine_Release_Notes](about_PSReadLine_Release_Notes.md). + ## Long Description -PowerShell 7.4 ships with PSReadLine 2.3.4. The current version is PSReadLine -2.3.4. The current version of PSReadLine can be installed and used on Windows +The current version of PSReadLine can be installed and used on Windows PowerShell 5.1 and newer. For some features, you need to be running PowerShell 7.2 or higher. @@ -79,15 +91,10 @@ To disable Predictive IntelliSense, just run: Set-PSReadLineOption -PredictionSource None ``` -> [!NOTE] -> Predictive IntelliSense is enabled by default in PSReadLine 2.2.6. For more -> information see, the [PSReadLine release history][02] in the **Notes** -> section below. - ## Custom Key Bindings PSReadLine supports custom key bindings using the `Set-PSReadLineKeyHandler` -cmdlet. Most custom key bindings call one of the [bindable functions][03], for +cmdlet. Most custom key bindings call one of the [bindable functions][02], for example ```powershell @@ -144,7 +151,7 @@ You can see many more examples in the file `SamplePSReadLineProfile.ps1`, which is installed in the **PSReadLine** module folder. Most key bindings use some helper functions for editing the command line. Those -APIs are documented in [about_PSReadLine_Functions][03]. +APIs are documented in [about_PSReadLine_Functions][02]. ## Notes @@ -245,101 +252,18 @@ az account get-access-token --resource=https://app.contoso.com --query accessTok $env:PGPASS = gcloud auth print-access-token ``` -### PSReadLine release history - -There have been many updates to PSReadLine since the version that ships in -Windows PowerShell 5.1. - -- Current release is PSReadLine 2.3.4 -- PowerShell 7.4 ships with PSReadLine 2.3.4 -- PowerShell 7.3 ships with PSReadLine 2.2.6 -- PowerShell 7.2 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 shipped with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 - -For a full list of changes, see the PSReadLine [ChangeLog][05]. - -- **PSReadLine 2.3.4** - -In addition to several bug fixes, this release includes the following -enhancements: - -- Scrollable **ListView** for Predictive IntelliSense - - Autoadjusts the size based on the size of the terminal window - - Can contain up to 50 prediction results - - Dynamic list header that shows the number of results and the current - prediction source -- Improved sensitive history scrubbing to allow retrieving token from `az`, - `gcloud`, and `kubectl` -- Improve the default sensitive history scrubbing to allow safe property access -- Added support for upcasing, downcasing, and capitalizing words -- Make tab completion show results whose `ListItemText` are different by case - only -- Supports the text-object command `` in the VI edit mode -- Change default color for inline prediction to dim -- Add a sample to README for transforming Unicode code point to Unicode char by - `Alt+x` -- Add the TerminateOrphanedConsoleApps option on Windows to kill orphaned - console-attached process that may mess up reading from Console input - -- **PSReadLine 2.2.6** - - In this release, the Predictive IntelliSense feature is enabled by default - depending on the following conditions: - - - If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell - 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` - - If VT is supported and PSReadLine running in PowerShell prior to 7.2, - **PredictionSource** is set to `History` - - If VT isn't supported, **PredictionSource** is set to `None` - -- **PSReadLine 2.2.5** - - Official servicing release with minor bug fixes. - -- **PSReadLine 2.2.2** - - - PSReadLine added two new predictive IntelliSense features: - - Added the **PredictionViewStyle** parameter to allow for the selection of - the new `ListView`. - - Connected PSReadLine to the `CommandPrediction` APIs introduced in - PowerShell 7.2 to allow a user can import a predictor module that can - render the suggestions from a custom source. - - Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for - dynamic help - - Improved the scrubbing of sensitive history items - - Lots of bug fixes and smaller improvements - -- **PSReadLine 2.1.0** - - This release rolls up the following enhancements added since the 2.0.4 - release: - - - Add Predictive IntelliSense suggestions from the command history - - Many bug fixes and API enhancements - -- **PSReadLine 2.0.4** - - This release rolls up the following enhancements added since the 2.0.0 - release: - - - Added the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow - searching for specific key bindings - ### Feedback & contributing to PSReadLine -[PSReadLine on GitHub][04] +[PSReadLine on GitHub][03] Feel free to submit a pull request or submit feedback on the GitHub page. ## See Also -- PSReadLine is heavily influenced by the GNU [readline][06] library. +- PSReadLine is heavily influenced by the GNU [readline][04] library. -[01]: /powershell/module/psreadline/set-psreadlineoption#example-7-use-historyhandler-to-filter-commands-added-to-history -[02]: #psreadline-release-history -[03]: about_PSReadLine_Functions.md -[04]: https://github.com/PowerShell/PSReadLine -[05]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt -[06]: https://tiswww.case.edu/php/chet/readline/rltop.html +[01]: xref:PSReadLine.Set-PSReadLineOption#example-7-use-historyhandler-to-filter-commands-added-to-history +[02]: about_PSReadLine_Functions.md +[03]: https://github.com/PowerShell/PSReadLine +[04]: https://tiswww.case.edu/php/chet/readline/rltop.html diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine_Release_Notes.md b/reference/7.5/PSReadLine/About/about_PSReadLine_Release_Notes.md new file mode 100644 index 00000000000..9c4c5a64f81 --- /dev/null +++ b/reference/7.5/PSReadLine/About/about_PSReadLine_Release_Notes.md @@ -0,0 +1,181 @@ +--- +description: This article contains the list of changes for each released version of PSReadLine. +Locale: en-US +ms.date: 09/17/2024 +online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_release_notes?view=powershell-7.5&WT.mc_id=ps-gethelp +schema: 2.0.0 +title: about_PSReadLine_Release_Notes +--- +# about_PSReadLine_Release_Notes + +This is a summary of changes to the **PSReadLine** module. For a full list of +changes, see the **PSReadLine** [ChangeLog][01]. + +- Current preview: v2.4.0-beta0 +- Current stable release: v2.3.5 + +## PSReadLine release history + +There have been many updates to PSReadLine since the version that ships in +Windows PowerShell 5.1. + +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 + +## Release Notes + +### v2.4.0-beta0 - 2024-03-01 + +- Fix copying text to system clipboard on Linux using `xclip` +- Tab completion uses the correct directory separator for the platform +- PowerShell version 5.1 is now the minimum supported version +- Get the Windows keyboard layout from the parent terminal process +- Fix a few VI key handlers to correctly close the edit group +- Read the history file in the streaming way to handle large files efficiently + +### v2.3.5 - 2024-04-02 + +This is a servicing release that excludes test components from SBOM generation. + +### v2.3.4 - 2023-10-02 + +In addition to several bug fixes, this release includes the following +enhancements: + +- Scrollable **ListView** for Predictive IntelliSense + - Autoadjusts the size based on the size of the terminal window + - Can contain up to 50 prediction results + - Dynamic list header that shows the number of results and the current + prediction source + - Show tooltips in the prediction list view +- Improved sensitive history scrubbing to allow retrieving token from `az`, + `gcloud`, and `kubectl` +- Improve the default sensitive history scrubbing to allow safe property access +- Added support for upcasing, downcasing, and capitalizing words +- Make tab completion show results whose `ListItemText` are different by case + only +- Supports the text-object command `` in the VI edit mode +- Change default color for inline prediction to dim +- Add a sample to README for transforming Unicode code point to Unicode char by + `Alt+x` +- Add the `TerminateOrphanedConsoleApps` option on Windows to kill orphaned + console-attached process that may mess up reading from Console input +- De-duplicate prediction results with the history results +- Make tab completion show results whose `ListItemText` are different by case only +- Add support for upcasing, downcasing, and capitalizing word +- Handle multi-line description for parameter help content + +### v2.2.6 - 2022-06-27 + +In this release, the Predictive IntelliSense feature is enabled by default +depending on the following conditions: + +- If Virtual Terminal (VT) is supported and PSReadLine running in PowerShell + 7.2 or higher, **PredictionSource** is set to `HistoryAndPlugin` +- If VT is supported and PSReadLine running in PowerShell prior to 7.2, + **PredictionSource** is set to `History` +- If VT isn't supported, **PredictionSource** is set to `None` + +### v2.2.5 - 2022-05-03 + +Official servicing release with minor bug fixes. + +### v2.2.3 - 2022-04-20 + +- Respect cancellation in `ReadOneOrMoreKeys()` + +### v2.2.2 - 2022-02-22 + +- PSReadLine added two new predictive IntelliSense features: + - Added the **PredictionViewStyle** parameter to allow for the selection of + the new `ListView`. + - Connected PSReadLine to the `CommandPrediction` APIs introduced in + PowerShell 7.2 to allow a user can import a predictor module that can + render the suggestions from a custom source. +- Updated to use the 1.0.0 version of `Microsoft.PowerShell.Pager` for + dynamic help +- Improved the scrubbing of sensitive history items +- Make `Ctrl+r` and `Ctrl+s` in `Vi` edit mode work the same way as in `Emacs` + edit mode +- Make `d0` to delete to the start of the current logical line in a multiline + buffer in VI mode +- Use `d^` to delete from the first non-blank character of a logical line +- VI Mode: `Undo` now leaves the cursor under the position at the start of the + deletion +- Make `HistorySearchBackward` and `HistorySearchForward` able to navigate the + list view +- Add the `SelectCommandArgument` bind-able function +- Remove `LineIsMultiline` in favor of multi-line agnostic algorithms +- Lots of bug fixes and smaller improvements + +### v2.1.0 - 2020-11-02 + +This release rolls up the following enhancements added since the 2.0.4 +release: + +- Add Predictive IntelliSense suggestions from the command history +- Many bug fixes and API enhancements + +### v2.0.4 - 2020-08-05 + +- vi-mode: Make `dd` deletes the logical line instead of the entire buffer +- vi-mode: Add `dG` to delete to the end of multiline buffer +- vi-mode: `dd` now handles single line or multiline buffers consistently +- vi-mode: Make `D` and `d$` delete to the end of the current logical line +- vi-mode - Make `dj` delete the current and next `n` logical lines +- vi-mode: Use `dk` to delete the previous `n` logical lines and the current + logical line in a multi-line buffer +- vi-mode: Add `dgg` to delete from the beginning of the buffer to the current + logical line +- Rename `PredictionColor` to `InlinePredictionColor` +- Allow `MaximumHistoryCount` to be set from user's profile +- Add the parameter `-PredictionSource` to `Set-PSReadLineOption`, with the options `None` and `History` +- Make the functions `AcceptSuggestion` and `AcceptNextSuggestionWord` bindable +- Relax the sensitive words we filter by changing `key` to `apikey` to reduce false positives +- Make `ViForwardChar` able to accept suggestions +- Expose `ViBackwardChar` and `ViForwardChar` as bindable functions + +### v2.0.3 - 2020-07-22 + +- Minor bug fixes + +### v2.0.2 - 2020-06-05 + +- Run script in local scope to make PSReadLine works in PSES in + `ConstrainedLanguageMode` +- Other bug fixes + +### v2.0.1 - 2020-04-01 + +- Add the `-Chord` parameter to `Get-PSReadLineKeyHandler` to allow searching + for specific key bindings +- Other minor bug fixes + +### v2.0.0 - 2020-02-11 + +- Allow `InsertPairedBraces` to wrap selected text +- Lots of bug fixes and smaller improvements +- Filter sensitive history items and avoid writing them to the history file +- Supporting line-wise yanks, including paste and undo +- Make `y0` yank up to the start of the logical line in `VI` mode +- Add API to detect if the screen reader is active +- Make `PageUp/PageDown` and `CtrlPageUp/CtrlPageDown` windows only +- Add script block vi mode indicator option +- Support vi mode `G` and `gg` movements in multi-line buffers +- Supports `_` and `$` to move to the beginning and end of the logical line in + vi mode +- Add `xtermjs` keybindings +- Support `Ctrl+u` in vi insert mode +- Enable `Ctrl+c` on non-Windows +- Interactive filtering during menu complete +- `Shift+Insert` bound to Paste in Windows mode +- `Ctrl+t` bound to `SwapCharacters` in Emacs mode +- `Ctrl+x,Ctrl+e` bound to `ViEditVisually` in Emacs +- `HistoryNoDuplicates` is now on by default + + +[01]: https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Changes.txt diff --git a/reference/7.5/PSReadLine/PSReadLine.md b/reference/7.5/PSReadLine/PSReadLine.md index f4375be1629..8642ab60e57 100644 --- a/reference/7.5/PSReadLine/PSReadLine.md +++ b/reference/7.5/PSReadLine/PSReadLine.md @@ -4,7 +4,7 @@ Help Version: 7.5.0.0 Locale: en-US Module Guid: 5714753b-2afd-4492-a5fd-01d9e2cff8b5 Module Name: PSReadLine -ms.date: 12/04/2023 +ms.date: 09/17/2024 schema: 2.0.0 title: PSReadLine --- @@ -18,13 +18,17 @@ editing environment in PowerShell. There have been many updates to PSReadLine since the version that ships in Windows PowerShell 5.1. -- PowerShell 7.4.0 ships with PSReadLine 2.3.4 -- PowerShell 7.3.0 ships with PSReadLine 2.2.6 -- PowerShell 7.2.5 ships with PSReadLine 2.1.0 -- PowerShell 7.0.11 ships with PSReadLine 2.0.4 -- PowerShell 5.1 ships with PSReadLine 2.0.0 +- v2.3.5 first shipped in PowerShell 7.4.2 and 7.5.0-preview.3 +- v2.3.4 first shipped in PowerShell 7.4.0-rc.1 +- v2.2.6 first shipped in PowerShell 7.3.0 +- v2.1.0 first shipped in PowerShell 7.2.5 +- v2.0.4 first shipped in PowerShell 7.0.11 +- v2.0.0 ships in Windows PowerShell 5.1 -These articles document version 2.3.4 of PSReadLine. +For more information about version differences, see +[about_PSReadLine_Release_Notes](about/about_PSReadLine_Release_Notes.md). + +These articles document version 2.3.5 of PSReadLine. > [!NOTE] > Beginning with PowerShell 7.0, PowerShell skips auto-loading PSReadLine on @@ -39,7 +43,7 @@ These articles document version 2.3.4 of PSReadLine. The main entry point for PSReadLine. ### [Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md) -Gets the bound key functions for the PSReadLine module. +Gets the key bindings for the PSReadLine module. ### [Get-PSReadLineOption](Get-PSReadLineOption.md) Gets values for the options that can be configured.