mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 08:51:14 -03:00
Make alt-{b,f} move in directory history if commandline is empty
alt-{left,right} move in the directory history (like in browsers).
Arrow keys can be inconvenient to reach on some keyboards, so
let's alias this to alt-{b,f}, which already have similar behavior.
(historically the behavior was the same; we're considering changing
that back on some platforms).
This happens to fix alt-{left,right} in Terminal.app (where we had
a workaround for some cases), Ghostty, though that alone should not
be the reason for this change.
Cherry-picked from commit f4503af037.
Closes #11105
This commit is contained in:
@@ -364,6 +364,8 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
|
||||
|
||||
- :kbd:`ctrl-b`, :kbd:`ctrl-f` move the cursor one character left or right or accept the autosuggestion just like the :kbd:`left` (``←``) and :kbd:`right` (``→``) shared bindings (which are available as well).
|
||||
|
||||
- :kbd:`alt-b`, :kbd:`alt-f` move the cursor one word left or right, or accept one word of the autosuggestion. If the command line is empty, moves forward/backward in the directory history instead.
|
||||
|
||||
- :kbd:`ctrl-n`, :kbd:`ctrl-p` move the cursor up/down or through history, like the up and down arrow shared bindings.
|
||||
|
||||
- :kbd:`delete` or :kbd:`backspace` or :kbd:`ctrl-h` removes one character forwards or backwards respectively.
|
||||
|
||||
Reference in New Issue
Block a user