My fancy Zsh prompt
It’s been several years since I updated this blog. Let’s dust it off a bit.
I updated my Zsh prompt to be more efficient and more useful. Features:
- Display current path abbreviated to the 3 last subdirectories:
- Automatically detect git repos. Display the name of the repo and the current branch:
- Display indicators if the git repo contains untracked/unstaged/staged files:
Here is the code:
Or course, if you are just starting with zsh you are better off just adopting
Oh My Zsh and Powerlevel10k.