sudo apt-get install zsh
Clone the zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
Create a symbolic link
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
Set Spaceship Theme, enter in ~/.zshrc
sudo nano ~/.zshrc
Within ~/.zshrc, find the line
ZSH_THEME and change it to > ZSH_THEME="spaceship"
At the end of the ~/.zshrc file I add the following content
SPACESHIP_PROMPT_ORDER=( user # Username section dir # Current directory section host # Hostname section git # Git section (git_branch + git_status) hg # Mercurial section (hg_branch + hg_status) exec_time # Execution time line_sep # Line break jobs # Background jobs indicator exit_code # Exit code section char # Prompt character ) SPACESHIP_USER_SHOW=always SPACESHIP_PROMPT_ADD_NEWLINE=false SPACESHIP_CHAR_SYMBOL="❯" SPACESHIP_CHAR_SUFFIX=" "
To configure a plugin, we also have to edit the ~/.zshrc file by adding or removing the plugin names in the variable array:
- Includes history features
git clone https://github.com/zsh-users/zsh-history-substring-search.git ~/.oh-my-zsh/custom/plugins/zsh-history-substring-search
- Highlight the command pack as they are typed
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
- Suggest commands based on history based on your typing
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
- ctrl+t will allow you to search any file/directory on the system
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install