5 ms·
About two years ago, a change in work caused me to become a heavy git user. One of the most important changes I made to my bash setup was to change my prompt to
by PeterWhittaker 5y ago
About two years ago, a change in work caused me to become a heavy git user. One of the most important changes I made to my bash setup was to change my prompt to multi line, detect whether I was in a git repo, include the branch in the prompt, and also include a summary of git status.
Very handy! (The check also makes sure I am in the repo part of the repo, and not, say, in its .git folder or other non-working folders.)
- agustif 5y agoIf you want all this and some more without setting it up yourself, oh-my-zsh spaceship prompt theme is great... I don't feel at home at a terminal without it by now, so one of my first installs after brew ;-) https://github.com/spaceship-prompt/spaceship-prompt https://github.com/spaceship-prompt/spaceship-prompt
- heavyset_go 5y ago> One of the most important changes I made to my bash setup was to change my prompt to multi line, detect whether I was in a git repo, include the branch in the prompt, and also include a summary of git status. Check out starship[1] if you haven't already. It's a prompt that does just this and more, and works across shells like Bash, fish, zsh, etc. [1] https://github.com/starship/starship https://github.com/starship/starship
- PeterWhittaker 5y agoThanks! I will definitely check that out!
- noahtallen 5y agoMy favorite for this purpose is pure prompt: https://github.com/sindresorhus/pure https://github.com/sindresorhus/pure I wasn’t sure about multi line at first, but really digging it now.