Zsh is a powerful shell, a popular alternative to bash, and the default shell on macOS. Oh My Zsh is an open source framework for Zsh with many themes and plugins. In this post, I’ll share my top 10 plugins and how they can make developers who use them, more productive.
First, How to Install These Plugins
- In your terminal open ~/.zshrc with vi or nano (or notepad/code editor if you’re a bum)
- Add the desired plugins to your plugin list with spaces between like so:
plugins=(git kubectl history emoji encode64)1. Zsh Autosuggestions
As you type, you’ll see a suggested completion come up in a faded gray color.
If you hit the right arrow key, it will fill in the suggestion. If you hit tab, it will list more suggestions below it. Continue to hit tab to cycle through.
I could honestly NOT survive anymore without the Zsh Autosuggestions plugin.
Note: This is the only plugin that requires you to actually install it first.

2. Sudo
You know when you type in a command that fails because you didn’t run sudo? Either you have to retype it with sudo at the front or hit the up arrow and then arrow back to the beginning of the sentence?
Well, the sudo plugin takes what you just typed and adds a sudo at the beginning for you.
The shortcut is to hit the escape key twice.

3. Web Search
Imagine…you’re in the terminal and you need to google something.
No need to switch over to your browser, just run the search from your terminal with the Web Search

4. Copypath
Sometimes you are deep in a folder and remember that you have to go back to update another file in the parent.
You don’t want to have to go back out and re-input that long path over again.
Well, you don’t. You can use the Copypath plugin to copy the path to your current directory to the clipboard.
Run copypath to copy the absolute path of the directory you’re in, or copypath <file> to copy the path of a specific file.
Copy it. Go back out and do what you have to do. Then cd paste that bad boy back in.
5. Copyfile
Copy the contents of a file to your clipboard.
It’s a capability you don’t know you need until you need it. You can get ahead of the game now with the copyfile plugin.

6. Copybuffer
Copybuffer is a plugin that allows you to copy the text currently typed in the command line.
I know, I know… you can’t think of a specific scenario where you need this at the moment. But you will.
Ctrl+O copies the text to the clipboard.

7. Dirhistory
This one is powerful.
Alt+Left takes you into the previous directory you were in. Alt+Right reverts that (moves you forward). And alt+up puts you in the parent directory.
See below how efficient the dirhistory plugin is.

8. Zsh Syntax Highlighting
Zsh Syntax Highlighting colors your commands as you type them. A valid command turns green, a typo or nonexistent command turns red, so you catch mistakes before you ever hit Enter.
I run it right alongside Zsh Autosuggestions. Like that one, it lives outside the Oh My Zsh core, so you clone it first:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingThen add zsh-syntax-highlighting to your plugin list. One note: it needs to be the last plugin in the list to work correctly.

9. History
The History command on any Unix system will show us a long list of commands that we have run in the past.
And if we want to recall a command from last week that we used, we grep it.
This plugin makes it as simple as a few keystrokes to search for past commands.
h - prints your history
hl - pipes your history through less so you can page and search it
hs [searchterm] - searches your history with grep
hsi [searchterm] - same as above but case insensitive.

10. Json Tools
Don’t you hate to make an api call or curl request and return a bunch of jumbled json?
This plugin has a number of neat capabilities, but I mainly use it to pretty print json.
Just pipe your call with | pp_json

Bonus: macOS
For you Mac users, don’t miss these. I honestly could do a whole post on the macos plugin.
Here are a few of my favorites:
- ofd - Opens the current directory in a Finder window
- pfd - Prints the path of the frontmost Finder window
- cdf - cd to the current Finder selection.
- man-preview - Opens a specified man page in Preview app
- tab - Opens current directory in new tab
- showfiles/hidefiles - shows or hides hidden files
Once your plugins are set, give your prompt a facelift too. Check out my top 12 Oh My Zsh themes to round out your setup.
Discussion
What are your favorite terminal plugins for productivity?
This page may contain affiliate links. Please see my affiliate disclaimer for more info.

