Tip 364Make Terminal Delete Words Like Other OS X Apps

In most OS X apps you can move the text cursor from word to word by holding down Option and tapping the Left/Right cursor keys. You can also delete words behind the cursor by holding down Option and hitting Delete (the key above Return on Mac keyboards; commonly referred to as Backspace on PC keyboards).

Terminal lets you use the Option+Left/Right cursor key combination, but not Option+Delete, to delete words. You could use the standard Bash keystroke to delete a word behind the cursor—Ctrl+W—or you could hit Esc and then hit Delete, but neither is entirely intuitive for Mac users.

The solution is simple. Open Terminal’s Preferences dialog box (hit Command+,), and then click the Settings ...

Get Mac Kung Fu, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.