Put working git branch in shell prompt for bash and zsh?
Craig Rodrigues
rodrigc at FreeBSD.org
Sun Dec 6 12:55:48 UTC 2015
Bartek,
Here are some further cool things I found from the minimal prompt
in zprezto:
GIT
===
(1) If a workspace has a modified file, which hasn't been checked in,
that
an orange circle appears in the prompt.
(2) If a workspace has file that hasn't been added with 'git add',
a red circle appears in the prompt.
(3) If a workspace is in the middle of a 'git rebase', then 'rebase'
appears in the prompt.
(4) If a workspace is in the middle of a 'git cherry-pick', then 'cherry'
appears in the prompt.
SVN
====
(1) If you cd into a Subversion workspace, the branch and revision number
are reflected
in the prompt:
============================
~ >> cd /usr/bin
/usr/bin >> pwd
/usr/bin
/usr/bin >> cd /usr/src
/usr/src - [10|291085] >> pwd
/usr/src
============================
I am sure I can cutomize things more to get the prompt exactly as
I like it, but that is amazing functionality out of the box.
I love it!
--
Craig
More information about the freebsd-git
mailing list