Skip to content

Instantly share code, notes, and snippets.

@satheshshiva
Last active January 9, 2024 05:26
Show Gist options
  • Save satheshshiva/efee0f2cba959d903a611b2288456610 to your computer and use it in GitHub Desktop.
Save satheshshiva/efee0f2cba959d903a611b2288456610 to your computer and use it in GitHub Desktop.
install colorful terminal using zsh

Colorize terminal with auto suggestions using zshell and p10k

Install Zsh shell

sudo apt install zsh (Linux)

Mac- Mac comes default with zsh. No need to install seperately

Set zsh as default:

chsh -s /usr/local/bin/zsh

or

chsh -s /bin/zsh

based on the zsh install folder. Run which zsh to determine the install folder.

Restart

Restart terminal. Check zsh is the default shell by executing, echo $SHELL

Install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install theme p10k

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc

Install plugin auto suggestion

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Install plugin syntax highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Enable plugins & theme

vim ~/.zshrc

plugins=(
        git
        docker
        golang
        adb
        brew
        zsh-autosuggestions
        zsh-syntax-highlighting
)

For a full list of plugins see https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins

Configure theme

p10k configure

If you want to revert to old shell (bash)

For reverting to old bash shell,

chsh -s /bin/bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment