aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-02 17:08:37 -0300
committerEuAndreh <eu@euandre.org>2023-04-02 17:08:37 -0300
commit78bb1ec9f7dbe2199a7346b250dea81a5052aa3f (patch)
tree66ab76edb1594aafa588e0cff46a041efb872e76
parentetc/sh/rc: Add timeout to vcs(1) ps1 (diff)
downloaddotfiles-78bb1ec9f7dbe2199a7346b250dea81a5052aa3f.tar.gz
dotfiles-78bb1ec9f7dbe2199a7346b250dea81a5052aa3f.tar.xz
etc/sh/rc: Fix vcs-ps1 outside repository
-rw-r--r--etc/sh/rc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/sh/rc b/etc/sh/rc
index 746ddc7..a3354c1 100644
--- a/etc/sh/rc
+++ b/etc/sh/rc
@@ -246,7 +246,9 @@ in_ssh_session() {
}
vcs_status() {
- timeout 0.5 vcs ps1 || color -c red '❌'
+ timeout 0.5 vcs ps1 || if [ $? = 124 ]; then
+ color -c red '❌'
+ fi
}
PS1='`error_marker`'$(timestamp)' '$(path)' `shell_status``vcs_status``guix_env``in_nix_shell`