Better documentation of forward-char and friends

This makes it match the code in reader.cpp, and explains why the default
binding of `right` accepts the complete line.

Closes #8748
This commit is contained in:
Martin Pool 2022-02-27 12:09:27 -08:00 committed by Johannes Altmanninger
parent 7555391790
commit c0be74c55a

View file

@ -89,10 +89,11 @@ The following special input functions are available:
only execute the next function if the previous succeeded (note: only some functions report success) only execute the next function if the previous succeeded (note: only some functions report success)
``accept-autosuggestion`` ``accept-autosuggestion``
accept the current autosuggestion completely accept the current autosuggestion
``backward-char`` ``backward-char``
moves one character to the left move one character to the left.
If the completion pager is active, select the previous completion instead.
``backward-bigword`` ``backward-bigword``
move one whitespace-delimited word to the left move one whitespace-delimited word to the left
@ -179,13 +180,15 @@ The following special input functions are available:
move one whitespace-delimited word to the right move one whitespace-delimited word to the right
``forward-char`` ``forward-char``
move one character to the right move one character to the right; or if at the end of the commandline, accept the current autosuggestion.
If the completion pager is active, select the next completion instead.
``forward-single-char`` ``forward-single-char``
move one character to the right; if an autosuggestion is available, only take a single char from it move one character to the right; or if at the end of the commandline, accept a single char from the current autosuggestion.
``forward-word`` ``forward-word``
move one word to the right move one word to the right; or if at the end of the commandline, accept one word
from the current autosuggestion.
``history-search-backward`` ``history-search-backward``
search the history for the previous match search the history for the previous match
@ -230,7 +233,8 @@ The following special input functions are available:
move the next word to the killring move the next word to the killring
``nextd-or-forward-word`` ``nextd-or-forward-word``
if the commandline is empty, then move forward in the directory history, otherwise move one word to the right if the commandline is empty, then move forward in the directory history, otherwise move one word to the right;
or if at the end of the commandline, accept one word from the current autosuggestion.
``or`` ``or``
only execute the next function if the previous succeeded (note: only some functions report success) only execute the next function if the previous succeeded (note: only some functions report success)