From 30db78e1dbb83ed3025f5378d4a83e5e5441da4e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 13 Jan 2023 18:27:26 +0300 Subject: [PATCH] .shellrc: Unset `$MAILCHECK` in non-login shells --- .profile | 3 --- .shellrc | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.profile b/.profile index 92c1032..7e6ba5a 100644 --- 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 diff --git a/.shellrc b/.shellrc index e3a0ac7..78beaf7 100644 --- 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" -- 2.39.5