Tag | zsh
Expanding my own “Oh My ZSH!”
I’ve been thinking about cleaning up my own ZShell config and putting it out in the wild, but that just didn’t seem to happen. I was looking for something in ZShell — I think it was getting version control information at the prompt and I stumbled upon a mention of Oh My ZSH which is a bunch of powerful ZShell configs arranged in a nice way.
I tried it and I liked it. But it didn’t have everything that I used. But, heck it’s on github — easy forking. So I did. My changes are:
- Change the
xiong-chiamiov-plustheme to usevcs_infoinstead of being git-specific. Gave the new theme the original name ofmikeh. - Option to configure a terminal with strange settings (labor intensive on the first run, perfectly wonderful after that.)
- Will automatically rehash the path, so new commands will be found immediately
- Added realias to quickly make a new shell alias/function (EDITOR env variable required)
- Removed upgrade checker (I don’t expect you to trust me)
- Share history with your zsh’s on the same host
More changes coming as time permits. Enjoy!
Zsh Completion Magic
I’m a happy user of zsh for a few years now and, while I don’t know all the subtleties of it, I find it a indispensable tool. People I know and respect keep asking me “Why not bash?” One of the big reasons is zsh’s completion system.
Bash has a add-on version of this, called bash-completion, and I used that before moving over to zsh full-time. Bash-completion feels, well, added on and slow and not always working. Zsh’s completion, however, keeps surprising me on how much it does do. As they say, a picture is worth a thousand words.
The above screenshot came with no configuration — I didn’t have to tell zsh about Django because, well, someone already did. And I’m glad for it.
It’s not just for Django, either. See what happened when I did “./configure <TAB>” in PHP’s source tree:
The top part is what I got when I did "./configure TAB". The part below my prompt is what I got when I did "./configure –with-TAB"
So note that zsh helps me figure out the right options. What I want to know the exact options for MySQL?
Again, none of this stuff had to be configured — I just told zsh I wanted completion and it gave it to me. I didn’t have to tell it that this was a configure script — it knew that! Just like it knew about the Django script.
This is just a taste. I hope you bite into zsh for more goodness.


