There are many answers pointing out that I can cut (kill) text in the terminal with ctrl+u like this one of Stack Overflow
I often feel it is inconvenient to use ctrl+u. Imagine this scenario:
- I type a long command A
- Suddenly I realise I need do another thing first, so I press ctrl+u to cut and (save) the current command
- I type command B
- Suddenly I realise I don't need command B, what I need is C,
- So I need to delete the current command, but I don't want ctrl+u, because that would overwrite command A with B.
- Have to crazily press backspace to delete B.
I need ctrl+u, but also need another command to only delete, not cut.