X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=5889186973ea19dde4a1a92375611f976c478526;hb=e705d5d7358e42a35dba8994f0ea4c445e4f0c81;hp=8fb53670fc42b7dab255a3bb156f89154f7250d8;hpb=d52b4dea53287f105e10e3d8b020a25c7dc577e7;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 8fb5367..5889186 100644 --- a/zsh/rc +++ b/zsh/rc @@ -375,8 +375,13 @@ prompt_precmd() { # User name (%n) in bright green. local user="${green}%B%n%b${default}" - # Host name (%m) in bright green. + # Host name (%m) in bright green; underlined if running on a remote system + # through SSH. local host="${green}%B%m%b${default}" + if [[ -n $SSH_CONNECTION ]]; then + host="%U${host}%u" + fi + # Number of background processes in yellow. local background="%(1j.${yellow}%j${default}.)" # Exit code in bright red if not zero.