diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-04-21 19:43:09 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-04-21 19:43:09 -0700 |
| commit | a968691e7380350e9098139aa2222267e5b2afe1 (patch) | |
| tree | 2dbfdb29c9dde4f64f5f150c7fdb5f34773e1473 | |
| parent | 26659676c293bb545ab326a297a861eedfed67d8 (diff) | |
system: check for git in bash prompt
| -rw-r--r-- | modules/nixos/tools/bash/prompt.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/nixos/tools/bash/prompt.sh b/modules/nixos/tools/bash/prompt.sh index d4d7c69..ede995a 100644 --- a/modules/nixos/tools/bash/prompt.sh +++ b/modules/nixos/tools/bash/prompt.sh @@ -16,6 +16,10 @@ else fi function prompt.git { + if ! command -v __git_ps1 &> /dev/null; then + return 1 + fi + GIT_PS1_STATESEPARATOR=';' GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES= |