macosshelliterm

How to delete a word in iTerm in mac os


I am using iTerm as a terminal in my mac. I am not able to delete a word in command line for ex in command cd /path/to/dir, i want to delete just path word , then how can i do that in iTerm.

basically what is the shortcut to delete a word in iTerm.

I looked at https://apple.stackexchange.com/questions/154292/iterm-going-one-word-backwards-and-forwards and fn+option+delete is just deleting a single character, not the whole word.


Solution

  • esc+d should work as a default.

    Or you can add a Send Escape Sequence based keyboard mapping for esc-d:

    enter image description here