2

On the Bash command-line, how do you cut the word immediately after the cursor?

Ctrl + W cuts the word before it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
qazwsx
  • 25,536
  • 30
  • 72
  • 106
  • [How to delete a whole word on the right in Linux Bash Shell command line](https://stackoverflow.com/questions/53967223/how-to-delete-a-whole-word-on-the-right-in-linux-bash-shell-command-line) offers additional insight into this – ggorlen Aug 20 '23 at 01:03

1 Answers1

7

I usually do this using Alt + D. You can look up "readline Emacs shortcuts".

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
cnicutar
  • 178,505
  • 25
  • 365
  • 392