From 8e50918dfaf5a27943e13f59dca68f1f00c22b83 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 2 Apr 2023 16:35:33 -0300 Subject: etc/sh/rc: Add timeout to vcs(1) ps1 --- etc/sh/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)'$ ' -- cgit v1.2.3