在 Linux / Mac 的 Cli 環境下, 若需要快速刪除目前的指令, 可以用 Control + U 來達成, 而從目前游標至最後的刪除可以用 Control + K 來達成, 這兩種方式的剪下指令的部分, 都可以用 Control + Y 來貼上.
Use Ctrl+U to cut text from cursor position to the beginning of the command line. Later, if you want, use Ctrl+Y to paste the cut text.
參考資料: https://askubuntu.com/questions/183933/how-do-i-delete-my-commands-quickly