Just a custom Oh My Zsh prompt theme

February 4, 2025 ยท View on GitHub

This is mostly to save myself time in the future, but I might as well share it with others.

ohelm

What this prompt shows (starting from the left)

Upper prompt

  • Shell privileges (% for user, # for root) ...
  • Current user
  • Directory path
  • If inside a Git repository ...
    • the currently checked out branch
    • working tree status (dirty/clean)
  • Return code of the last command

Lower prompt

  • Command prompt
  • (to the right) current Kubernetes cluster context:namespace

For this prompt to work, you need the kube-ps1 plugin and Nerd Fonts.

Install

  1. Install the aforementioned dependencies.
  2. Clone the repository to your favorite location. For me that is the home directory.

git clone https://github.com/devopsguy/ohelm-zsh-theme.git .custom

  1. Set the Zsh custom directory in your .zshrc

Look for the ZSH_CUSTOM variable and set it to your custom directory location.

ZSH_CUSTOM=$HOME/.custom

  1. Set the Zsh theme to use in your .zshrc

Look for the ZSH_THEME variable and set it to ohelm.

ZSH_THEME="ohelm"

  1. Source (reload) your Zsh config.

omz reload

  1. Enjoy.