#68 - Oh My Zsh

Links, Code, and Transcript

In this episode, I wanted to quickly chat about my default shell and a few things I find useful about it. I’m using the Z Shell, with the Oh My Zsh framework, and the Robby Russell theme.

So, I’m using the Z Shell, or Zed Shell, depending on where you’re from. But, I am actually using Oh My Zsh, which is an awesome framework that wraps the shell, and gives you all types of cool features.

Oh My Zsh, has lots of different themes and plugins for making your command line life easier. You can read about it more on the website here, but there are around 250+ plugins for things like Ansible, Docker, Kubernetes, and you name it. This can be really useful for smart command-line autocomplete and autocorrect. There are also lots of themes you can try out that make you command prompt look pretty cool.

You can checkout the Github page and they have instructions on how to install it. The page also chats about themes, plugins, and just general configuration of the Oh My Zsh framework.

Here’s the plugins page too if you wanted to browse through it. I’ll include all these links in the episode notes below. So, you can see things like Ansbile in here, lots of things for Docker, Git, Kubernetes, etc. Likely, if you are doing something at the command line, someone has written a plugin for it.

But, that’s not all. There are also tons of cool themes for dressing up the command line too. I’m just using the default robbyrussle theme as it works pretty well for me. If you’re at all interested in this, have a look through here, and I’m sure you’ll find something you like.

Alright, so I wanted to show you two things that I use pretty much everyday at the command prompt. So, I switched my shell from bash a while back and have been pretty happy so far. The first thing I wanted to show you is, tab completion, let me show you what I am talking about. So, say I wanted to change into the ~/downloads directory. But, on my Mac the directory is capitalized. Well, using Oh My Zsh, it will detect what capitalization you need and automatically switch it. So, I can write it in lower case, and it’ll figure out what is needed. This seems so simple, but honestly, it removed lots of friction for me working at the command line. Just not having to guess the capitalization of things.

$  ~ cd download [tab]
$  ~ cd Downloads/

The second thing, that I use pretty much daily, is the command prompt git integration. So, let me show you what I am talking about. Say, I create a directory, episode 68. I change into it. Now, when you’re working in a directory that is under version control, Oh My Zsh will show you. So, lets, git init a repo here. See, now the prompt has changed. Personally, I use this all the time to visually tell me what state the git repo is in. These are honestly, super simple little things, but they sort of compound and remove tons of friction at the command line. There are all types of prompt integrations for showing current time, system load, etc. So, I just wanted to share with you what I’m using. I’d recommend trying it out, if you’re at all interested, and see how you find it.

$  ~ mkdir e68
$  ~ cd e68
$  e68
$  e68 git init
Initialized empty Git repository in /Users/jweissig/e68/.git/
$  e68 git:(master)

Alright, that’s it for this episode. Thanks for watching. Bye.

Metadata
  • Published
    2019-04-16
  • Duration
    3 minutes
  • Download
    MP4 or WebM
You may also like...