This is mostly to save myself time in the future, but I might as well share it with others.
- 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
- 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 the aforementioned dependencies.
- 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
- 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
- Set the Zsh theme to use in your
.zshrc
Look for the
ZSH_THEME
variable and set it toohelm
.
ZSH_THEME="ohelm"
- Source (reload) your Zsh config.
omz reload
- Enjoy.