Feature Request: Create a `EndOfLineOrAcceptSuggestion function` for `Ctrl+e` binding
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
No source file or test is named. Start by locating the existing EndOfLine and AcceptSuggestion handlers and their tests, then add the combined Ctrl+e behavior described in the issue. Done means the cursor moves to the line end when it is not there and accepts the inline suggestion when it is already there, with tests covering both cases.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Prerequisites
- Write a descriptive title.
Description of the new feature/enhancement
Many users, especially those with Emacs muscle memory, expect Ctrl+e to move the cursor to the end of the line (the EndOfLine function).
With the introduction of predictions, many of these same users want to bind Ctrl+e to also accept the full inline suggestion, similar to how RightArrow works.
The current, discoverable way to do this is:
Set-PSReadLineKeyHandler -Chord 'Ctrl+e' -Function AcceptSuggestion
However, this binding completely overrides the original EndOfLine behavior. This forces the user to choose between one function or the other, which is a poor experience.
Proposed technical implementation details (optional)
I propose adding a new, built-in PSReadLine function (e.g., EndOfLineOrAcceptSuggestion) that intelligently combines both behaviors.
The logic for this new function would be:
- If the cursor is not at the end of the line, perform the
EndOfLineaction. - If the cursor is already at the end of the line, perform the
AcceptSuggestionaction.
This would create a "smart" key binding that "does the right thing" based on context.
- Vorherrschende Sprache
- C#
- Sterne
- 4.4k
- Forks
- 341
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/PSReadLine
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
PowerShell/PSReadLine#3470 · 3 Reaktionen ·
Alle Issues in PowerShell/PSReadLine
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
nightscout/nocturne#1425 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100