diff options
author | EuAndreh <eu@euandre.org> | 2023-02-20 17:38:59 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-02-20 17:38:59 -0300 |
commit | 1ac547bf987fa137d13774d1700686cd3b049328 (patch) | |
tree | c8c522501e32b51f6d3011df01db45939e5154e7 | |
parent | etc/sh/rc: Join both "if $DISPLAY" sections (diff) | |
download | dotfiles-1ac547bf987fa137d13774d1700686cd3b049328.tar.gz dotfiles-1ac547bf987fa137d13774d1700686cd3b049328.tar.xz |
etc/sh/rc: Show hostname in $PS1 if on SSH session on different desktop
-rw-r--r-- | etc/sh/rc | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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)'$ ' |