From: Oleg Broytman Date: Fri, 13 Jan 2023 15:27:26 +0000 (+0300) Subject: .shellrc: Unset `$MAILCHECK` in non-login shells X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=30db78e1dbb83ed3025f5378d4a83e5e5441da4e .shellrc: Unset `$MAILCHECK` in non-login shells --- 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"