aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-10-21 16:17:35 +1300
committerTom Ryder <tom@sanctum.geek.nz>2013-10-21 16:17:35 +1300
commit15958e9488c4fbd3fda96ada6692b571898e0616 (patch)
tree84a029f03cb1f05a56ce0ffc334238cd4e8d2e1a /bash
parentMove bell alias into aliases file (diff)
downloaddotfiles-15958e9488c4fbd3fda96ada6692b571898e0616.tar.gz
dotfiles-15958e9488c4fbd3fda96ada6692b571898e0616.zip
Do tell me about mail if I'm likely to care
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 208f8b70..abfc6267 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -27,8 +27,12 @@ HISTCONTROL=ignoreboth
# Keep the times of the commands in history
HISTTIMEFORMAT='%F %T '
-# Don't tell me about mail
-unset -v MAILCHECK
+# Only tell me about new mail if MAIL is set and in $HOME
+if [[ $MAIL == "$HOME"/* ]]; then
+ MAILCHECK=15
+else
+ unset -v MAILCHECK
+fi
# Never beep at me
setterm -bfreq 0 2>/dev/null