In this article, we'll cover the commands/steps to install ZSH, OhMyZsh and two other plugins that will make your life easier (as a developer).
Note: this article focuses on commands for the openSUSE OS (Leap 15.5). If you are using a Debian/Ubuntu based distro, please checkout this article.
Before we begin, check if git
is installed in your system. If not, install it before proceeding further.
Open your terminal (Konsole) and run the command,
sudo zypper in git-core
# install zsh
sudo zypper in zsh
# check the installed version
zsh --version
# set zsh as default SHELL
chsh -s $(which zsh)
Please logout and login for the changes to take effect.
Copy-paste the below command into your terminal and follow the onscreen instructions,
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-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
Edit the plugins
section of the ~/.zshrc
file as shown below,
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
Save and exit. Restart all terminal sessions or reload the config file using the command,
source ~/.zshrc