Put working git branch in shell prompt for bash and zsh?

Bartek Rutkowski robak at FreeBSD.org
Fri Dec 4 16:54:05 UTC 2015


> On 4 Dec 2015, at 14:20, Craig Rodrigues <rodrigc at FreeBSD.org> wrote:
> 
> Hi,
> 
> I am heavily using git for my projects these days.
> Typically I am working on multiple projects, with
> multiple checked out trees.  I am also switching
> between branches a lot.
> 
> Sometimes because I am working with so many
> checked out trees, I lose track of what branch
> I am working on.
> 
> Can anyone point me to a "stupid shell trick"
> which would put the currently active branch in the
> shell prompt?  I typically use bash and zsh shells,
> so having the trick for those shells would be useful.
> 
> Thank!
> 

Check out 'zprezto' ZSH config framework with 'sorin' theme activated, you'll love it :)

Kind regards,
Bartek Rutkowski



More information about the freebsd-git mailing list