Friday, May 10, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 1477  / 1 Year ago, sun, may 21, 2023, 10:41:19

I'm using Ctrl+r for searching command history in the terminal but this keyboard shortcut is not comfortable for me.



I would prefer using Ctrl+k



How can I update this keyboard shortcut?



(Updating to Ctrl+k in addition to Ctrl+r is also an option)


More From » gnome-terminal

 Answers
5

You can use the shell builtin command "bind" for that. What you specifically want is:



bind '"C-k":"C-r"'



Put that in your ~/.bashrc file and it should work each time you open up a shell. For more details checkout the bind section here.


[#21427] Sunday, May 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
;