Skip to content

ZSH Instead of Bash

Jenn edited this page Jan 19, 2018 · 4 revisions

Essentially, ZSH is an extension of Bash but has tools that make things easier. For example, you can directly iterate through your command history a lot easier.

Please follow the Install and set up zsh as default from https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH but before logging out then logging back in copy and paste the following command in a terminal: sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" then log out then back in.

ROS

The main difference is, instead of updating the .bashrc file, update the .zshrc file. Also instead of sourcing the setup.bash file, source the setup.zsh file.

For example in the .bashrc the line:

source /opt/ros/kinetic/setup.bash
source ~/test_ws/devel/setup.bash

Now becomes in the .zshrc:

source /opt/ros/kinetic/setup.zsh
source ~/test_ws/devel/setup.zsh

Since ZSH is a popular Shell, ROS already automatically generates both .bash and .zsh setup files