I'm currently trying to optimize or learn the keybindings of the applications I use the most, in a simple and ergonomic way. Inspired by Ergoemacs keybindings, I would like to rebind some very basics commands for use in Bash as for example:
I've seen ways to bind custom complex commands. I've found nowhere how to do this. In windows I used to do it system wide with autohotkeys but I'm now with a linux system and no autohotkey alternative works well for me.
How can I set those key bindings for my Bash terminal?
You are looking for readline
( documentation ) library settings. In Linux, programs that offer some kind of command line interface (eg bash interactive shell, octave interactive shell, python interactive shell etc.) use readline
library to customize key-bindings.
Key-bindings are usually added in .inputrc
configuration file in user's home directory. Here is an example of .inputrc
configuration file.
gnome-terminal
) key-bindings configuration In menubar of terminal emulator: Edit > Keyboard shortcuts
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.