Back in the day, if my cursor was in the middle of a really long shell command I'd just hit Ctrl+C to get myself a new command prompt.
Then I learned about Ctrl+K/C and life was good. Unfortunately those sequences are a little awkward for me, so now I'd like to map one shortcut to reset the entire line with one sequence.
Is it possible to map something like Ctrl+X so it performs those two commands? I checked the variables in man bash
and found kill-whole-line
but I'm not sure how to implement it in my .bashrc -- or if that's even what I need (seems like it is).
ED: I learned Ctrl+X might not be the best choice because it's a gateway to other bash shortcuts, so I went with something else.