Compare commits

..

1 Commits

Author SHA1 Message Date
34965bb98d Move entire git-prompt to C 2018-09-11 18:12:45 +01:00

View File

@ -144,6 +144,7 @@ int main() {
while (NULL != fgets(status, sizeof(status) - 1, process.out)) {
char X = status[0];
char Y = status[1];
if (X == '?' && Y == '?') {
++untracked;
} else if ((X == 'A' && (Y == 'A' || Y == 'U')) ||
@ -172,6 +173,7 @@ int main() {
}
}
check(process_close(process));
if (indexed || modified || deleted || unmerged || untracked) { // modified
char int_buf[32];
if (indexed) {
@ -192,6 +194,7 @@ int main() {
} else { // clean
append(prompt, 1, "%{%B%F{2}%}✓%{%f%b%}");
}
// print the prompt
puts(prompt);
return 0;