aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-02 16:35:33 -0300
committerEuAndreh <eu@euandre.org>2023-04-02 16:35:33 -0300
commit8e50918dfaf5a27943e13f59dca68f1f00c22b83 (patch)
tree52b982378039354bea379ac14634b1880b2d4cc8
parentetc/ssh/authorized_keys: Disallow root@toph key (diff)
downloaddotfiles-8e50918dfaf5a27943e13f59dca68f1f00c22b83.tar.gz
dotfiles-8e50918dfaf5a27943e13f59dca68f1f00c22b83.tar.xz
etc/sh/rc: Add timeout to vcs(1) ps1
-rw-r--r--etc/sh/rc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/sh/rc b/etc/sh/rc
index c894be6..746ddc7 100644
--- a/etc/sh/rc
+++ b/etc/sh/rc
@@ -245,7 +245,11 @@ in_ssh_session() {
fi
}
-PS1='`error_marker`'$(timestamp)' '$(path)' `shell_status``vcs ps1``guix_env``in_nix_shell`
+vcs_status() {
+ timeout 0.5 vcs ps1 || color -c red '❌'
+}
+
+PS1='`error_marker`'$(timestamp)' '$(path)' `shell_status``vcs_status``guix_env``in_nix_shell`
'$(in_ssh_session)'$ '