mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
Make alt-d on empty commandline call dirh again
alt-d used to do that until evil merge[*] 213e90704
(Merge remote-tracking branch
'upstream/master' into bind_mode, 2014-01-15) which changed the order of
the \ed bindings such that the smart dirh version would be shadowed by the
simpler ones.
[*] git blame alone failed to find it because it skips merge commits.
This commit is contained in:
parent
565eb85d8b
commit
e571774c97
3 changed files with 2 additions and 3 deletions
|
@ -125,6 +125,7 @@ New or improved bindings
|
||||||
- Multiline commands are indented before being sent to the editor, which matches the rendering in fish.
|
- Multiline commands are indented before being sent to the editor, which matches the rendering in fish.
|
||||||
- ``backward-kill-path-component`` and friends now treat ``#`` as part of a path component (:issue:`10271`).
|
- ``backward-kill-path-component`` and friends now treat ``#`` as part of a path component (:issue:`10271`).
|
||||||
- Bindings like :kbd:`alt-l` that print output in between prompts now work correctly with multiline commandlines.
|
- Bindings like :kbd:`alt-l` that print output in between prompts now work correctly with multiline commandlines.
|
||||||
|
- ``alt-d`` on an empty command line lists the directory history again. This restores the behavior of version 2.1.
|
||||||
- `history-prefix-search-{backward,forward}` now maintain the cursor position instead of moving the cursor to the end of the command line (:issue:`10430`).
|
- `history-prefix-search-{backward,forward}` now maintain the cursor position instead of moving the cursor to the end of the command line (:issue:`10430`).
|
||||||
- The ``E`` binding in vi mode now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
|
- The ``E`` binding in vi mode now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
|
||||||
- If the terminal supports shifted key codes from the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/), ``shift-enter`` now inserts a newline instead of executing the command line.
|
- If the terminal supports shifted key codes from the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/), ``shift-enter`` now inserts a newline instead of executing the command line.
|
||||||
|
|
|
@ -85,7 +85,7 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
|
||||||
bind --preset $argv end end-of-line
|
bind --preset $argv end end-of-line
|
||||||
bind --preset $argv home beginning-of-line
|
bind --preset $argv home beginning-of-line
|
||||||
|
|
||||||
bind --preset $argv alt-d 'set -l cmd (commandline); if test -z "$cmd"; echo; dirh; commandline -f repaint; else; commandline -f kill-word; end'
|
bind --preset $argv alt-d 'if test "$(commandline)." = .; __fish_echo dirh; else; commandline -f kill-word; end'
|
||||||
bind --preset $argv ctrl-d delete-or-exit
|
bind --preset $argv ctrl-d delete-or-exit
|
||||||
|
|
||||||
bind --preset $argv alt-s 'for cmd in sudo doas please; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end'
|
bind --preset $argv alt-s 'for cmd in sudo doas please; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end'
|
||||||
|
|
|
@ -77,8 +77,6 @@ function fish_default_key_bindings -d "emacs-like key binds"
|
||||||
bind --preset $argv alt-\< beginning-of-buffer
|
bind --preset $argv alt-\< beginning-of-buffer
|
||||||
bind --preset $argv alt-\> end-of-buffer
|
bind --preset $argv alt-\> end-of-buffer
|
||||||
|
|
||||||
bind --preset $argv alt-d kill-word
|
|
||||||
|
|
||||||
bind --preset $argv ctrl-r history-pager
|
bind --preset $argv ctrl-r history-pager
|
||||||
|
|
||||||
# term-specific special bindings
|
# term-specific special bindings
|
||||||
|
|
Loading…
Reference in a new issue