Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.57 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.57 KB

cheeky-prompt.zsh

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:

  1. Chicken emoji (there isn't a Barci one yet)
  2. Current working directory: Useful since most of the work is in the monorepo
  3. Git information
  4. Current Active GCP Cluster / GCP Project
  5. Command input in new line

Installation

zsh / oh-my-zsh

  1. Download the theme in your Downloads folder
git clone --quiet [email protected]:kampanosg/cheeky-prompt.zsh.git ~/Downloads/cheeky-prompt.zsh
  1. Move the theme in the oh-my-zsh custom themes directory
cp ~/Downloads/cheeky-prompt.zsh/cheekyprompt.zsh-theme ~/.oh-my-zsh/custom/themes
  1. Activate the theme in your .zhrc
ZSH_THEME="cheekyprompt"

Config (Optional)

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'