]> git.phdru.name Git - dotfiles.git/commitdiff
.shellrc: Unset `$MAILCHECK` in non-login shells
authorOleg Broytman <phd@phdru.name>
Fri, 13 Jan 2023 15:27:26 +0000 (18:27 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 13 Jan 2023 15:27:26 +0000 (18:27 +0300)
.profile
.shellrc

index 92c103270569c0efc08125c811c60c61448553dd..7e6ba5a93a2bdea01778c766baf3638e2fde149d 100644 (file)
--- a/.profile
+++ b/.profile
@@ -146,9 +146,6 @@ if [ -t 0 ] ; then
             MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
     fi
     export MAIL MAILPATH
-    if [ -n "$STY" -a "$WINDOW" != 0 ]; then
-        unset MAILCHECK
-    fi
 
     BROWSER="links2:links:elinks:w3m:lynx"
     case "$TERM" in
index e3a0ac7a01c1931230de2926692c7c45ced715fe..78beaf7ad6991ee6e20a79304de731d21dc89dae 100644 (file)
--- a/.shellrc
+++ b/.shellrc
@@ -47,6 +47,10 @@ fi
 # clear screen and history, logout
 chlo() { clear; cd; >$HISTFILE; unset HISTFILE; history -c; logout || exit; }
 
+if [ -n "$STY" -a "$WINDOW" != 0 ]; then
+    #unset MAILCHECK everywhere except for the 1st GNU screen window
+    unset MAILCHECK
+fi
 
 include() {
     cfg="$1"