Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (2024)

Zshell is a powerful terminal and popular alternative to bash. Oh My Zsh is an open source framework for Zshell 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.

Quick Nav

  1. Video version
  2. Zsh Autosuggestions
  3. Sudo
  4. Web Search
  5. Copydir
  6. Copyfile
  7. Copybuffer
  8. Dirhistory
  9. Zsh Reload
  10. History
  11. Json Tools
  12. OSX

Video version - or watch it on YouTube


Or if you prefer to read the article, read on!

First, How to Install These Plugins

  1. In your terminal open ~/.zshrc with vi or nano (or notepad/code editor if your a bum)
  2. 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 thorough.

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.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (1)

2. Sudo

You know when you type in a command that fails because you didnt 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.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (2)

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 theWeb Search plugin.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (3)

4. Copydir

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 theCopydir plugin to copy the path to your current directory to the clipboard.

Copy it. Go back out and do what you have to do. Then cd paste that bad boy back in.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (4)

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.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (5)

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.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (6)

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.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (7)

8. Zsh Reload

This plugin is now deprecated. You can run the command “exec zsh” instead.

You know when you make changes to .bashrc or .bash_history or .zshrc, and you have to reopen the terminal or “source” it to refresh.

Well now just type src and hit enter to refresh the zsh session.

This plugin is a real time saver.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (8)

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
hs [searchterm] - searches your history with grep
hsi [serachterm] - same as above but case insensitive.

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (9)

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

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (10)

Bonus: OSX

For you Mac users, don’t miss these. I honestly could do a whole post on this plugin.

The osx plugin is now deprecated and has been renamed to macos. It’s all the same functionality and can be found here. Be sure to update the name in your .zshrc plugins.

Here are a few of my favorites:

  1. ofd - Opens the current directory in a Finder window
  2. pfd - Prints the path of the frontmost Finder window
  3. cdf - cd to the current Finder selection.
  4. man-preview - Opens a specified man page in Preview app
  5. tab - Opens current directory in new tab
  6. showfiles/hidefiles - shows or hides hidden files

Discussion

What are your favorite terminal plugins for productivity?

Top 10 Oh My Zsh Plugins For Productive Developers - Travis Media (2024)
Top Articles
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 6745

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.