mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00: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.
55 lines
1.5 KiB
Text
55 lines
1.5 KiB
Text
# 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
|