aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/sh/rc10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/sh/rc b/etc/sh/rc
index a6ff24b..b49440a 100644
--- a/etc/sh/rc
+++ b/etc/sh/rc
@@ -243,8 +243,16 @@ in_nix_shell() {
printf ')'
}
+in_ssh_session() {
+ if [ -n "${SSH_CLIENT:-}" ]; then
+ color -c blackb '\\u'
+ printf '@'
+ color -c purple '\\H'
+ fi
+}
+
PS1='`error_marker`'$(timestamp)' '$(path)' `shell_status``vcs ps1``guix_env``in_nix_shell`
-$ '
+'$(in_ssh_session)'$ '