A lot of people asked me after reading my article A Brief Introduction to Laravel Envoy, how do I get my terminal window to look so awesome. It’s not that hard as it may look like, I keep it simple. Here is what I use:
and of course Ubuntu GNU/Linux.
As a developer, you can increase your productivity by using terminal. But, sometimes people are just too lazy to type long commands over and over again. And it gets even more boring if you repeat same stuff every single day, at the job, at home, everywhere. That’s the primary reason why so many people are so scared of the terminal. But, it does not have to be that way. Few years ago I was so excited when I “discovered” Oh-My-Zsh. And almost instantly I switched Bash with ZSH.
Here are the main reasons why I chose ZSH instead of Bash:
- incredibly powerful, context based tab completion handling
- pattern matching on steroids
- really great community-driven frameworks available
There are two major frameworks available for ZSH, Prezto and Oh-My-Zsh. Personally, I prefer Oh-My-Zsh, but Pretzo have it’s own advantages to.
Installing ZSH and Oh-My-Zsh
Installation of ZSH is pretty simple, on Debian/Ubuntu just enter:
1 |
sudo apt-get install zsh |
Oh-My-Zsh you can install with curl or wget, so make sure you have them installed:
1 |
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh |
or with wget:
1 |
wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh |
For more detailed installation instruction visit the official page.
Themify Your Promt
Another great thing with Oh-My-Zsh is that you have a ton of useful themes and plugins you can use to customize your prompt. I use agnoster as my default theme. To setup this theme, just download and install one of the patched fonts for Vim-Powerline. For me DejaVuSansMono is good enough. After you have installed patched font, edit ~/.zshrc and set agnoster for theme:
1 2 3 4 5 |
... ZSH_THEME="agnoster" ... |
Now, open Guake Preference and set default interpreter to /bin/zsh :
and in the Appearance tab your patched font:
Plugins
You can find full list of plugins here. To enable some plugin, just add it to the list in the ~/.zshrc . For example, if you are a Laravel developer as I am, you want to have Laravel4 and Laravel5 plugins enabled:
1 2 3 4 5 6 |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=(git rvm rails laravel5 laravel4) |
You’ll now have php artisan completion, which is pretty cool:
As I mentioned, you can use plugins for many other tools, for example: bower, capistrano, docker, heroku and so on.
That’s it for now. I recommend you to make the switch right now. You’ll make no regret. Play around with configuration, plugins, themes. Share your configuration or tips how to make it better.
Latest posts by Mirza Pasic (see all)
- Quick tip: How to delete a tag from a Git repository? - August 20, 2016
- Laravel Accessors and Mutators - December 17, 2015
- How to allow remote connections to PostgreSQL database server - December 15, 2015