Senpai is a ZSH clean prompt theme for Devops.
- Shows
git
branch and status. - Prompt character turns red if the last command didn't exit with
0
. - Shows
Kubernetes
context,AWS
profile,GCP
project andAzure
active cloud. - Prompt is customizable through vars.
Requires Git 2.0.0+ and ZSH 5.2+
If you just use a zsh without any framework, simply clone this repository and reference it in your ~/.zshrc:
$ git clone https://github.com/hiroru/senpai-zsh.git ~/.senpai-zsh
$ echo 'source ~/.senpai-zsh/senpai.zsh-theme' >> ~/.zshrc
To install this theme for use in Oh-My-Zsh, clone this repository into your OMZ custom/themes directory.
$ git clone https://github.com/hiroru/senpai-zsh.git ~/.oh-my-zsh/custom/themes/senpai-zsh
You then need to select this theme in your ~/.zshrc:
ZSH_THEME="hiroru/senpai-zsh"
To install this theme for use in ZIM, clone this repository into your ZIM prompt/external-themes directory.
$ git clone https://github.com/hiroru/senpai-zsh.git ~/.zim/modules/prompt/external-themes/senpai-zsh
$ ln -s ~/.zim/modules/prompt/external-themes/senpai-zsh/senpai.zsh-theme ~/.zim/modules/prompt/functions/prompt_senpai_setup
Add this at the beginning of your ~/.zshrc:
SENPAI_INSTALLATION_PATH=~/.zim/modules/prompt/external-themes/senpai-zsh/senpai.zsh-theme
You then need to select this theme in your ~/.zimrc:
zprompt_theme='senpai'
You can add these values which are self-explanatory into your ~/.zshrc
file. By default all options are enabled.
# .zshrc
autoload -U promptinit; promptinit
# optionally define some options
SENPAI_SHOW_K8S=false
SENPAI_SHOW_AZURE=false
prompt senpai
- Check if Git module is available before enabling
Add color scheme to white consoleAdd modules enable/disable through config file and/or env vars
- Fixed issues with Kubernetes context when KUBECONFIG is defined
- Added white color scheme
- Fixed color variables used across all functions
- Added timestamp
- Now AWS profile also checks
AWS_DEFAULT_PROFILE
- Added customizable prompt options
- Added GCP support
- Added Azure Support
- Initial release
MIT © Sergi Barroso