mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
Don't clear scrollback with the \cl binding
ncurses since 6.0 sends the "E3" sequence along with "clear", even for just `clear` or `tput clear`. This deletes the scrollback buffer which is usually not what you want. Fixes #2855.
This commit is contained in:
parent
9cae25d1eb
commit
afdd1a98c1
2 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
# fish 2.6.0 (released ???)
|
# fish 2.6.0 (released ???)
|
||||||
|
|
||||||
- The `read` command now has a default limit of 10 MiB. If a line is longer than that it will fail with $status set to 122 and the var will be empty. You can set a different limit by setting the FISH_READ_BYTE_LIMIT variable.
|
- The `read` command now has a default limit of 10 MiB. If a line is longer than that it will fail with $status set to 122 and the var will be empty. You can set a different limit by setting the FISH_READ_BYTE_LIMIT variable.
|
||||||
|
- The \cl binding no longer deletes the scrollback buffer with ncurses >= 6.0 (#2855).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,9 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
|
||||||
|
|
||||||
bind $argv \el __fish_list_current_token
|
bind $argv \el __fish_list_current_token
|
||||||
bind $argv \ew 'set tok (commandline -pt); if test $tok[1]; echo; whatis $tok[1]; commandline -f repaint; end'
|
bind $argv \ew 'set tok (commandline -pt); if test $tok[1]; echo; whatis $tok[1]; commandline -f repaint; end'
|
||||||
bind $argv \cl 'clear; commandline -f repaint'
|
# ncurses > 6.0 sends a "delete scrollback" sequence along with clear.
|
||||||
|
# This string replace removes it.
|
||||||
|
bind $argv \cl 'clear | string replace \e\[3J ""; commandline -f repaint'
|
||||||
bind $argv \cc __fish_cancel_commandline
|
bind $argv \cc __fish_cancel_commandline
|
||||||
bind $argv \cu backward-kill-line
|
bind $argv \cu backward-kill-line
|
||||||
bind $argv \cw backward-kill-path-component
|
bind $argv \cw backward-kill-path-component
|
||||||
|
|
Loading…
Reference in a new issue