Bash-Prompt-Builder icon indicating copy to clipboard operation
Bash-Prompt-Builder copied to clipboard

Fix of parsing of git ahead information

Open Blup1980 opened this issue 9 years ago • 2 comments

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 $

Blup1980 avatar Feb 17 '16 19:02 Blup1980

After more testing, that easy fix doesn't seem to solve the issue.

Blup1980 avatar Feb 17 '16 20:02 Blup1980

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.

Blup1980 avatar Feb 18 '16 06:02 Blup1980