]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
crontab.d/jobs: Add support to run job every 6 hours.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 8fb53670fc42b7dab255a3bb156f89154f7250d8..97555277906d9c42a119824c819603f7893d5747 100644 (file)
--- 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
 }