9
rated 0 times
[
9]
[
0]
/ answers: 1 / hits: 7106
/ 3 Years ago, mon, june 14, 2021, 2:49:52
Is there a way to bind hotkeys to textual commands in the terminal? For example:
ctrl+b == git branch <ret>
More From » gnome-terminal
Is there a way to bind hotkeys to textual commands in the terminal? For example:
ctrl+b == git branch <ret>
You can use the bash bind
command as seen in the linked Stackoverflow answer.
In your case, the command would be:
bind '"C-b":"git branch
"'
To make it stick from session to session then add it to your ~/.inputrc
Bash bind reference. (also available as man bash
)