PSReadLine icon indicating copy to clipboard operation
PSReadLine copied to clipboard

[vi-mode] Supports `_` (void) and `+` (system clipboard) named registers for copying and pasting.

Open springcomp opened this issue 1 year ago • 0 comments

PR Summary

This PR builds upon the existing support for Vi Registers and now supports two new named registers:

  • Vi Register _ (underscore) supports copying text into the "black hole" register. That text is lost forever and is not copied to the internal builtin clipboard.
  • Vi Register + (plus sign) or " (double-quote) supports copying text to, and pasting text from the operating system host’s system clipboard. Copied text does not end up in the internal builtin clipboard which stays unaffected.

This PR is a follow up on design discussions that happened in #3769.

PR Checklist

  • [x] PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • [x] Summarized changes
  • [x] 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:
Microsoft Reviewers: Open in CodeFlow

springcomp avatar Oct 12 '24 08:10 springcomp