Prettify Raspberry Pi shell with oh my zsh
Although the Raspbian OS provides users with a nice GUI, I still prefer using shell to complete most of my tasks. However, the built in terminal, based on bash, is a little bit boring and ugly. So I decide to use oh-my-zsh to make it look cool and fun.
Firstly, you have to install zsh to replace bash.
sudo apt-get install zsh
Then set zsh as default shell
chsh -s /bin/zsh
But by now, the shell terminal still looks not cool. Let’s use oh-my-zsh to prettify it. Firstly, install it from GitHub through wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Now restart the terminal you’ll see something different, something much cooler than the original bash shell. You can also switch to other themes according to the official zsh instructions here.
As for me, I’m using the “Agnoster” theme so I can see Git Status. And this is not enough. Let’s make the zsh shell more developer friendly with auto-suggestion and syntax highlights.
Firstly, install the plugins under zsh plugin folder.
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Then add it into your .zshrc file
vim ~/.zshrc
plugins=(git zsh-autosuggestions autojump zsh-syntax-highlighting)
Now restart the terminal and enjoy coding with shell!