mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-01 06:53:39 +08:00
444f9f8715
This allows for marking certain bindings as part of a preset, which allows us to - only erase those when switching presets - go back to the preset binding when erasing a user binding - only show user customization if requested - make bare bind statements in config.fish work (!!!11elf!!!) Fixes #5191. Fixes #3699.
56 lines
1.5 KiB
Plaintext
56 lines
1.5 KiB
Plaintext
# Listing bindings
|
|
bind --preset '' self-insert
|
|
bind --preset \n execute
|
|
bind --preset \r execute
|
|
bind --preset \t complete
|
|
bind --preset \cc commandline\ \'\'
|
|
bind --preset \cd exit
|
|
bind --preset \ce bind
|
|
bind --preset \e\[A up-line
|
|
bind --preset \e\[B down-line
|
|
bind --preset \e\[C forward-char
|
|
bind --preset \e\[D backward-char
|
|
bind -M bind_mode \cx true
|
|
bind --preset '' self-insert
|
|
bind --preset \n execute
|
|
bind --preset \r execute
|
|
bind --preset \t complete
|
|
bind --preset \cc commandline\ \'\'
|
|
bind --preset \cd exit
|
|
bind --preset \ce bind
|
|
bind --preset \e\[A up-line
|
|
bind --preset \e\[B down-line
|
|
bind --preset \e\[C forward-char
|
|
bind --preset \e\[D backward-char
|
|
bind -M bind_mode \cx true
|
|
# Preset only
|
|
bind --preset '' self-insert
|
|
bind --preset \n execute
|
|
bind --preset \r execute
|
|
bind --preset \t complete
|
|
bind --preset \cc commandline\ \'\'
|
|
bind --preset \cd exit
|
|
bind --preset \ce bind
|
|
bind --preset \e\[A up-line
|
|
bind --preset \e\[B down-line
|
|
bind --preset \e\[C forward-char
|
|
bind --preset \e\[D backward-char
|
|
# User only
|
|
bind -M bind_mode \cx true
|
|
# Adding bindings
|
|
bind --preset '' self-insert
|
|
bind --preset \n execute
|
|
bind --preset \r execute
|
|
bind --preset \t complete
|
|
bind --preset \cc commandline\ \'\'
|
|
bind --preset \cd exit
|
|
bind --preset \ce bind
|
|
bind --preset \e\[A up-line
|
|
bind --preset \e\[B down-line
|
|
bind --preset \e\[C forward-char
|
|
bind --preset \e\[D backward-char
|
|
bind -M bind_mode \cx true
|
|
bind \t 'echo banana'
|
|
# Erasing bindings
|
|
bind --preset \t complete
|