Skip to content

Instantly share code, notes, and snippets.

@dbarjs
Last active June 10, 2020 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbarjs/b74ef0ea1ea3bbe8e0a58253c61c6496 to your computer and use it in GitHub Desktop.
Save dbarjs/b74ef0ea1ea3bbe8e0a58253c61c6496 to your computer and use it in GitHub Desktop.

ZSH

Doc: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH

sudo apt install zsh

Change the shell default to zsh:

chsh -s $(which zsh)

Tip: verify /etc/passwd if the changes is okay

Create ~/.zshrc file bases on template:

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

Install ZSH Completions: https://github.com/zsh-users/zsh-completions

Tip: always restart your user session on any zsh config changes

Add commands (snap packages) to zsh

Add this line of code to /etc/zsh/zprofile:

emulate sh -c 'source /etc/profile'

Oh My Zsh

Doc: https://ohmyz.sh/

Install oh-my-zsh:

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

Powerlevel10k

Install the powerlevel10 theme: https://github.com/romkatv/powerlevel10k run p10k configure to run configuration wizard

Syntax Highlighting

Instructions: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md

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

Activate the plugin in ~/.zshrc:

plugins=(zsh-syntax-highlighting)

Tip: the plugin function works like array, and the plugin names can be separated by space like zsh-syntax-highlighting asdf git.

References

Diolinux: https://www.youtube.com/watch?v=Y769Tn7DYiQ

Dev.to article: https://dev.to/mskian/install-z-shell-oh-my-zsh-on-ubuntu-1804-lts-4cm4

Your terminal can be much, MUCH more productive 💻: https://medium.com/@ivanaugustobd/your-terminal-can-be-much-much-more-productive-5256424658e8

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