1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Version Control and a Solid Editor

By

4 of 4

ZSH
Version Control and a Solid Editor

While the default bash shell is fine, and what is about to be done can probably be done in Bash, doing so in zsh is simpler and already set up for you. Zsh is an alternative to Bash with more interactive features, better prompts, tab completion, etc. On Ubuntu, it's installed using the following command.


$ sudo apt-get install zsh

And set it to your default shell.


$ chsh -s /usr/bin/zsh

Since the default shell is inherited by the login process, no new terminal windows will start zsh until you log out and log in again. But for now, you can run zsh by using the zsh command.

There is a very useful collection of prompts called oh-my-zsh that can be installed that make very powerful prompts very easy to set up. It can be installed with the following command.


$ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

Once you start (or restart) zsh, you'll see your prompt has changed. To explore oh-my-zsh a bit, go to ~/.oh-my-zsh/plugins and ~/.oh-my-zsh/themes. You will find a dizzying array of plugins and themes. To find themes that already have something ruby-related configured, you can grep ruby ~/.oh-my-zsh/themes/*. To select a theme, change the ZSH_THEME variable in ~/.zshrc and source ~/.zshrc. Which theme you choose is highly subjective. I find the bira theme to be simple and functional, it displays the Ruby version as well as git information in a simple and attractive prompt.

See More About
  1. About.com
  2. Technology
  3. Ruby
  4. Tutorials
  5. Ruby on Windows the Easy Way
  6. Installing Git and Vim

©2014 About.com. All rights reserved.