commit 56ce0bd24e6b2ac106679c041f16b4c7fdbe50d8 parent 1e74487cd8efd3aaec3d073aa7d75d4a0d6f3cda Author: hhvn <dev@hhvn.uk> Date: Sun, 2 Jan 2022 16:16:10 +0000 .rcrc: use bqstatus for diff Diffstat:
M | .rcrc | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/.rcrc b/.rcrc @@ -28,8 +28,9 @@ fn __prompt { } # unstaged changes - __prompt_diff = ``(''){git diff >[2=1]} - if (echo $__prompt_diff | grep '.' >/dev/null && !~ $__prompt_diff warning:*) { + __prompt_diff = ``(''){git diff >[2]/dev/null} + __prompt_diffstatus = $bqstatus + if (echo $__prompt_diff | grep '.' >/dev/null) { if (echo $__prompt_diff | grep '.' >/dev/null) { tput setaf 8 } else { @@ -44,7 +45,7 @@ fn __prompt { wc -l | tr -d '\n'} __prompt_gitoutput = 1 - } else if (!~ $__prompt_diff warning:*) { + } else if (~ $bqstatus 0) { tput setaf 15 printf '=' __prompt_gitoutput = 1