Tech Reflect

Tech Reflect

Share this post

Tech Reflect
Tech Reflect
Delete previous word or path item in Terminal

Delete previous word or path item in Terminal

Chris Hynes - cricket's avatar
Chris Hynes - cricket
Jun 12, 2018
∙ Paid

Share this post

Tech Reflect
Tech Reflect
Delete previous word or path item in Terminal
Share

In pretty much any Cocoa app, option-delete is an incredibly useful shortcut to delete the previous word or path component. If you mess up typing a word, for example, you can start fresh instead of having to use the mouse/trackpad or hit backspace multiple times. For paths, it’s great for when you want to remove a few components from the end of a path.

In Terminal, however, this is not possible by default. You can enable a command in the Edit menu called “Use Option as Meta Key” and it will restore this Cocoa editing behavior.

You can also enable it on a per-theme basis in the Keyboard tab.I find this incredibly useful in quite a few scenarios.

  • You make a typo and it’s just quicker to do option-delete and retype the word

  • You’re typing a command and you’ve messed up the flags or perhaps the ordering of arguments and you want to redo only part of the command

  • You’re typing a path and you realize it’s incorrect. In this case, option-delete becomes a way to go up one level in the hierarchy.

Extr…

Keep reading with a 7-day free trial

Subscribe to Tech Reflect to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Christopher Hynes
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share