My ZSH Config (.zshrc)

January 14, 2016

I spent the last few weeks setting up ZSH the way I want it. I’m pretty happy with the result, so I figured I’d share.

If you just want to download it and skip the explanation below, here’s the github link.

Screenshot

Pictures are worth a thousand words, so here’s what it looks like:

 

console

There are a bunch of other things not pictured, like colored grep results, the prompt turns red if you’re root, and all of the sweet interactive stuff that ZSH offers.

Summary

My .zshrc is made up of a handful of files:

I also use a custom font, which is necessary for the pretty prompt. The “powerline” fonts are edited to include a few special characters that can make your prompt look sweeter. If you don’t have these characters edited into your font, my prompt won’t look right on your system. You can get my font here: DejaVu Sans Mono (Powerline).

Download Everything

Here’s an easy-to-download zip that has all of the files enclosed: config.zip

File Stucture / Setup

I put most of my config files in “.config” in my home directory, and create symlinks to them. On most of my computers, “.config” links to a dropbox folder, so I get immediate updates. Here are two screenshots which might make things more clear:

dir-structure1

dir-structure2

~/.ssh/config is a hard link to ~/.config/.ssh/config, because SSH is picky about ownership and permissions on that file.

Why don’t I use .oh-my-zsh?

I don’t like that it is large and does a bunch of stuff I don’t need. It’s great, but I wanted more control and less mess.

Limitations

There are probably a bunch more, but these are the main things that jump out at me.

Why use ZSH instead of BASH

Because it’s better. It feels just like bash, but it does a lot of things in better ways. There are plenty of posts out in the wild about this topic. I haven’t found one good reason to run bash instead of zsh.

Update October 10, 2016

I removed the timestamp after commands. It was causing a small delay after every command which was annoying.

.zshrc

functions.zsh

spectrum.zsh

prompts.zsh

termsupport.zsh


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *