Using zsh as my shell

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

I’ve been using bash for about 14 years, first on Linux, and the later on Mac OSX. I have heard good things about zsh. The idea of seeing my git branch listed in my terminal, at all times, will save me from many mistakes (I have often committed code on the wrong branch). This article finally convinced me to switch to zsh on my Mac:

z
No this is not a typo, the last thing I want to show you is z. A script that makes navigating in the terminal much faster. On a mac you can just do brew install z. For Linux machines refer the the GitHub repo.

Once you’ve installed it, add the following to your .zshrc (including the . at the beginning).

. `brew –prefix`/etc/profile.d/z.sh

That was the last time I made you edit your .zshrc, I swear!

Instead of doing cd ~/Somefolder/Anotherfolder/project/, you can just do z proj. It’s that simple! Keep in mind that z is not a magic script that knows where every folder on your computer is. It keeps track of your cd to directories in a file called ~/.z – Once you’ve cd’d into a directory once, you can use z to navigate to it.

Post external references

  1. 1
    http://jilles.me/badassify-your-terminal-and-shell/
Source