A simple yet effective theme prompt for your PERiTerm. Developed specifically for my day-to-day use within Nando's as I couldn't find one that covered all my needs. Hopefully, it can spice up your terminal as well 🌶️
The prompt features:
- Chicken emoji (there isn't a Barci one yet)
- Current working directory: Useful since most of the work is in the monorepo
- Git information
- Current Active GCP Cluster / GCP Project
- Command input in new line
- Download the theme in your Downloads folder
git clone --quiet [email protected]:kampanosg/cheeky-prompt.zsh.git ~/Downloads/cheeky-prompt.zsh
- Move the theme in the
oh-my-zsh
custom themes directory
cp ~/Downloads/cheeky-prompt.zsh/cheekyprompt.zsh-theme ~/.oh-my-zsh/custom/themes
- Activate the theme in your
.zhrc
ZSH_THEME="cheekyprompt"
The theme reads an (optional) config file from the following path: ~/.config/cheeky-prompt/cluster
.
The cluster
file can hold the name of the cluster that it's currently active. The theme styles the right-hand-side prompt depending on the value. Alternatively, if no config is found, the theme displays the current GCP project.
Example
In my .shrc
, I have an alias
when I want to connect to any cluster. At the end of the connection sequence, I've added an echo
command to write the current cluster to the config file. For example:
alias dev='... && echo "dev" > ~/.config/cheeky-prompt/cluster'