Added backward-path-component, forward-path-component and kill-path-component

Closes issue #12127

Closes #12147
This commit is contained in:
ELginas
2025-12-07 16:17:51 +00:00
committed by Johannes Altmanninger
parent c3a9edceac
commit 608269320e
5 changed files with 46 additions and 15 deletions

View File

@@ -145,12 +145,17 @@ The following special input functions are available:
``backward-kill-line``
move everything from the beginning of the line to the cursor to the killring
.. _cmd-bind-backward-kill-path-component:
``backward-kill-path-component``
move one path component to the left of the cursor to the killring. A path component is everything likely to belong to a path component, i.e. not any of the following: `/={,}'\":@ |;<>&`, plus newlines and tabs.
``backward-kill-word``
move the word to the left of the cursor to the killring. The "word" here is everything up to punctuation or whitespace.
``backward-path-component``
move one :ref:`path component <cmd-bind-backward-kill-path-component>` to the left.
``backward-word``
move one word to the left
@@ -241,6 +246,9 @@ The following special input functions are available:
commandline, does not accept the current autosuggestion (if any). Does not change the selected item in the completion pager,
if shown.
``forward-path-component``
move one :ref:`path component <cmd-bind-backward-kill-path-component>` to the right; or if at the end of the commandline, accept a path component from the current autosuggestion.
``forward-single-char``
move one character to the right; or if at the end of the commandline, accept a single char from the current autosuggestion.
@@ -308,6 +316,9 @@ The following special input functions are available:
``kill-line``
move everything from the cursor to the end of the line to the killring
``kill-path-component``
move one :ref:`path component <cmd-bind-backward-kill-path-component>` to the killring.
``kill-selection``
move the selected text to the killring