Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Ctrl+r in Vi edit mode same as Emacs edit mode #3148

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Jan 12, 2022

PR Summary

This PR is essentially the same as #2469, with a little update on the tests.

Fix #2453

Make ctrl+r in Vi EditMode same as Windows (#2453)

Existing functionality (ViSearchHistoryBackward, SearchForward) already available via / and ? shortcuts.
But ReverseSearchHistory and ForwardSearchHistory had no shortcuts.

Also copy ctrl+s and ctrl+g since these have no conflicts in vi mode.

Remove vi mode existing tests and copy (almost) verbatim from InteractiveHistorySearch to VIInteractiveHistorySearch.

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • 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
Microsoft Reviewers: Open in CodeFlow

davetapley and others added 2 commits January 11, 2022 16:50
Existing functionality (ViSearchHistoryBackward, SearchForward)
is already available via / and ? shortcuts.
But ReverseSearchHistory and ForwardSearchHistory had no none.

Also copied Ctrl+S and Ctrl+G since these had no conflicts in vi mode.

Removed vi mode existing tests and copied (almost) verbatim
from InteractiveHistorySearch to VIInteractiveHistorySearch.

Omitted test which uses _.Alt_d from VIInteractiveHistorySearch
since this is emacs specific.
@daxian-dbw
Copy link
Member Author

I have reviewed #2469 and the changes looked good to me. I just pushed another commit on top for some test updates. So, I will merge this PR now. Thanks @davetapley for your contribution!

@daxian-dbw daxian-dbw merged commit acb8ccb into PowerShell:master Jan 12, 2022
@daxian-dbw daxian-dbw deleted the ctrlr branch January 12, 2022 01:13
@daxian-dbw daxian-dbw changed the title Make Ctrl+R in Vi edit mode same as Emacs edit mode Make Ctrl+r in Vi edit mode same as Emacs edit mode Jan 12, 2022
@ghost
Copy link

ghost commented Jan 28, 2022

🎉 v2.2.1-rc1 has been released which incorporates this pull request. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Set-PSReadlineOption -EditMode vi" breaks Ctrl+r / bck-i-search
2 participants