Post

OhMyZSH Shell setup

Below are all the steps to configure your terminal to look like the screenshot

Shell

  1. Install ZSH and set as default shell.
    1
    
    sudo apt install zsh
    
  2. Install OhMyZSH.
    1
    
    sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    
  3. Download and install the below fonts. Once installed set your terminal font to MesloLGS NF. Source
  4. Install Powerlevel10k theme.
    1
    
    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
    
  5. Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.
  6. Restart ZSH.
    1
    
    exec zsh
    
  7. Type p10k configure if the configuration wizard doesn’t start automatically.
  8. Install zsh-autosuggestions. Source
    1
    
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    
  9. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
    1
    2
    3
    4
    
    plugins=( 
     # other plugins...
     zsh-autosuggestions
    )
    
  10. Create a .zsh file to add customizations to for autosuggestions.
    1
    
    nano ~/.oh-my-zsh/custom/zsh-autosuggestions.zsh
    
  11. Add the below in the created file
    1
    2
    
    ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#87ff87"
    ZSH_AUTOSUGGEST_STRATEGY=(history completion)
    
  12. Restart your terminal.
This post is licensed under CC BY 4.0 by the author.