Compare commits
1 Commits
fa0bf6f3bf
...
34965bb98d
Author | SHA1 | Date | |
---|---|---|---|
34965bb98d |
@ -144,6 +144,7 @@ int main() {
|
|||||||
while (NULL != fgets(status, sizeof(status) - 1, process.out)) {
|
while (NULL != fgets(status, sizeof(status) - 1, process.out)) {
|
||||||
char X = status[0];
|
char X = status[0];
|
||||||
char Y = status[1];
|
char Y = status[1];
|
||||||
|
|
||||||
if (X == '?' && Y == '?') {
|
if (X == '?' && Y == '?') {
|
||||||
++untracked;
|
++untracked;
|
||||||
} else if ((X == 'A' && (Y == 'A' || Y == 'U')) ||
|
} else if ((X == 'A' && (Y == 'A' || Y == 'U')) ||
|
||||||
@ -172,6 +173,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
check(process_close(process));
|
check(process_close(process));
|
||||||
|
|
||||||
if (indexed || modified || deleted || unmerged || untracked) { // modified
|
if (indexed || modified || deleted || unmerged || untracked) { // modified
|
||||||
char int_buf[32];
|
char int_buf[32];
|
||||||
if (indexed) {
|
if (indexed) {
|
||||||
@ -192,6 +194,7 @@ int main() {
|
|||||||
} else { // clean
|
} else { // clean
|
||||||
append(prompt, 1, "%{%B%F{2}%}✓%{%f%b%}");
|
append(prompt, 1, "%{%B%F{2}%}✓%{%f%b%}");
|
||||||
}
|
}
|
||||||
|
|
||||||
// print the prompt
|
// print the prompt
|
||||||
puts(prompt);
|
puts(prompt);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user