Skip to content

Instantly share code, notes, and snippets.

@alexolinux
Last active January 13, 2024 20:38
Show Gist options
  • Save alexolinux/a56408216055b5e7424e5174969b0d99 to your computer and use it in GitHub Desktop.
Save alexolinux/a56408216055b5e7424e5174969b0d99 to your computer and use it in GitHub Desktop.
ZSH More Productive Enviroment for DevOps.

Becoming the ZSH More Productive

My Personal Preferences

This 'HowTo' goes through steps to become your shell env fully productive.

Features

  • Install newer ZSH version
  • Install OHMyZSH
  • Install Powerlevel10k
  • Add ZSH Plugins:
    • zsh-autosuggestions
    • zsh-syntax-highlighting

Install newer ZSH version

sudo yum -y groupinstall "Development tools"
sudo yum install ncurses-devel
curl -L https://sourceforge.net/projects/zsh/files/zsh/${ZSH_VER}/zsh-${ZSH_VER}.tar.xz | tar xJ
cd zsh-${ZSH_VER}/
./configure
sudo make && sudo make install
sudo ln -s /usr/local/bin/zsh /usr/bin/zsh
zsh --version
echo '/usr/bin/zsh' | sudo tee -a /etc/shells
chsh -s /usr/bin/zsh $USER

Install OHMyZSH

Install OHMyZSH via the command-line with curl:

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

Install Powerlevel10k

Clone Repository:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.

After that, update your ZSH enviroment:

source ~/.zshrc

Note

Once this done, an interactive sequence of powerlevel10k definitions will be started. Follow the steps and save it.

Add ZSH Plugins

  1. zsh-autosuggestions
  • Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. zsh-syntax-highlighting
  • Clone this repository in oh-my-zsh's plugins directory:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. Add these ZSH plugins to the Zsh list (inside ~/.zshrc):
plugins=(
    zsh-autosuggestions
    zsh-syntax-highlighting
)
  1. (RE)Start a new ZSH session.

Sources:

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