PSReadLine
PSReadLine copied to clipboard
Windows: Make the `Ctrl+RightArrow` key accepts the next suggestion word in addition to its default by-word movement.
PR Summary
- Modify the
NextWordhandler to accept the next suggestion word for consistently using theCtrl+RightArrowkey - The
Ctrl+RightArrownow moves the cursor word-by-word for both editing the line and accepting suggestions - Before, the
NextWordhandler did not operate on the suggestion text when the cursor was at the end of the line NextWordis now an alternative to the less consistent custom bindingForwardCharAndAcceptNextSuggestionWorddefined in theSamplePSReadlineProfile.ps1scriptForwardCharAndAcceptNextSuggestionWordis less consistent because it mixes word movement, line movement, and character movement in a single keyNextWordis now consistent because theCtrl+RightArrowkey moves the cursor uniformly in the editing and suggestion cases- Documentation is not needed at PowerShell-Docs because
NextWordis not in the list of the advertised functions - This commit is a feature addition, and it does not impact the previous use of the
Ctrl+RightArrowkey in Windows
PR Checklist
- [x] PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- [x] Summarized changes
- [ ] Make sure you've added one or more new tests
- [x] Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
- User-facing changes
- [x] Not Applicable
- OR
- [ ] Documentation needed at PowerShell-Docs
- [ ] Doc Issue filed: