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)
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)
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.
Check this stack overflow question about a similar problem.
But my advice is to keep Ctrl+k and Ctrl+r as is and get used to, because Ctrl+k is used to erase from the cursor to the end of the line which is a very useful shortcut.