SuperCharge your Terminal with oh-my-zsh

Supercharge your terminal experience with oh-my-zsh

I have been using the Terminal for 4 years now as a Front End Developer and over that time I have come across certain tools that really helped improve my experience with it. In this article I want to share with you these tools and why I recommend them. (BTW this tutorial assumes you are on a Mac!)

TL:DR;

You can watch this youtube video if you don’t like reading, everything is covered in this video:

iTerm2 — Terminal Alternative

Firstly, I don’t use the in built terminal that comes with the MacOS. Instead I use iTerm2 which is a terminal emulator for MacOs. Some of its features include Split Panes, Autocomplete and Search functionality. The reason I mainly like it is it is highly configurable.

I use Zsh which is a shell designed for interactive use. On top of this I use Oh My Zsh which is a framework for helping you manage your Zsh configuration. It comes with a bunch of plugins and themes. Below I will share my (current) favourite theme and plugins.

I use iTerm2 which is a terminal emulator for MacOs. Some of its features include Split Panes, Autocomplete and Search functionality.

Powerlevel10K Theme

I am using the Powerlevel10K theme at the moment. It is highly configurable and when you set it up for the first time you run through about 20 or so questions to customise the look and feel of your terminal.

Different styles available with Powerlevel10k theme
Different styles available with the Powerlevel10k theme

I love this theme for a few reasons:

  • Instantly shows you the current working directly
  • Show git status of current folder you are in
  • Look damn cool!

Plugin 1: Zsh-z

The first plugin I want to share is Zsh-z. This is a command line tool that allows you to jump quickly to directories that you have visited frequently in the past, or recently.

Jumping from the root directory to a folder 4 levels deep in one command

So rather than cd blah/blah/blah everywhere you can just type z something and assuming you have visited this folder before it will jump right to it. This plugin saves you a bunch of time and makes navigating around your folder structure in your terminal an absolute pleasure.

This plugin saves you a bunch of time and makes navigating around your folder structure in your terminal an absolute pleasure.

Plugin 2: Zsh-autosuggestions

Another great plugin is the Zsh-autosuggestions and this is a great plugin for those pesky long commands that you sometime have to run in the terminal. For example I use this a great deal when working with docker. Docker commands can be remarkably long so it really helps to have this plugin which suggests commands based on history and completions.

See previous commands appear as you type

As soon as you start typing in the terminal suggestions appear based on your history and recent completions. You can then press the up arrow to run through the suggestions.

Plugin 3: Zsh-aliases-exa

As developers we are naturally lazy on certain tasks and where ever you can save some effort it’s always an attractive proposition.

Zsh-aliases-exa does exactly this. Why type 5 characters when you can type 1! It all saves time and energy which can be better spent solving those pesky bugs in production! This plugin is basically an alternative to the ls command in the terminal.

List of commands available with zsh-aliases-exa

With this plugin you can just type l instead of ls -la and get the same information in your terminal. I use this on a daily basis and saves me both time and effort.

Conclusion

There are many plugins available for the terminal using oh-my-zsh and it’s really worth taking the time to explore some and try them out. The Terminal can (should) be a great tool in the developer’s tool box and the plugins available really help supercharge your experience.

Father. Husband. Music Lover. Avid Reader. Spiritual Seeker. Czech — Prague. Constantly Failing. But remember… don’t take yourself too seriously.