X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=97555277906d9c42a119824c819603f7893d5747;hb=75acbd549c35dc45c90894d22ccd7f0235d7f0ed;hp=8fb53670fc42b7dab255a3bb156f89154f7250d8;hpb=d52b4dea53287f105e10e3d8b020a25c7dc577e7;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 8fb5367..9755527 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. @@ -873,7 +878,7 @@ periodic() { # Display fortunes. (( $+commands[fortune] )) && fortune -ac # Display reminders. - (( $+commands[rem] )) && [ -f ~/.reminders ] && rem -h + (( $+commands[rem] )) && [[ -f ~/.reminders ]] && rem -h }