Bash-Prompt-Builder
Bash-Prompt-Builder copied to clipboard
Fix of parsing of git ahead information
the output of git version 1.9.1 is not anymore parsed correctly. With one commit that is ahead, the resulting prompt of the original code was:
xxxxxxxxxxxxxxxxxxxxxx (unstable:54b6478) +(use $
using the fix:
xxxxxxxxxxxxxxxxxxxxxx (unstable:54b6478) +1 $
After more testing, that easy fix doesn't seem to solve the issue.
The addition of "" around the git status forces echo to keep the end on line information. Thus the next grep only outputs the line of interrest.
It's now working as expected.