1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(zsh): show hostname if in ssh

This commit is contained in:
2023-03-06 11:44:38 +01:00
parent 18ec46c773
commit 4e6c8e13af

View File

@@ -77,7 +77,11 @@
precmd () {
vcs_info
RPROMPT="$vcs_info_msg_0_"
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then
RPROMPT="$(hostname)"
else
RPROMPT="$vcs_info_msg_0_"
fi
if [[ -n $IN_NIX_SHELL ]]; then
PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})λ%f '
else