On Tue, Aug 3, 2010 at 2:16 PM, Thomas Spura <toms...@fedoraproject.org> wrote: > function bash_git_branch > { > git branch 2> /dev/null | grep \* | awk '{print $2}' > } > > export PS1='\[\033[01;32m\...@\h\[\033[01;34m\] \w\[\033[31m\] > $(bash_git_branch)\[\033[01;34m\]\$\[\033[00m\] ' > > So no need to call python, if awk is enought :) >
No need to call grep either - awk is enough git branch 2>/dev/null | awk '/^\*/{print $2}' -- Iain. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel