From c34980890095b59f4115d5658020567f09a7135b Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 2 Apr 2001 12:24:55 +0000 Subject: moved to ./Functions/Misc/checkmail --- Functions/Misc/checkmail | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Functions/Misc/checkmail (limited to 'Functions/Misc') diff --git a/Functions/Misc/checkmail b/Functions/Misc/checkmail deleted file mode 100644 index 9cc743db4..000000000 --- a/Functions/Misc/checkmail +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/local/bin/zsh -# -# This autoloadable function checks the folders specified as arguments -# for new mails. The arguments are interpeted in exactly the same way -# as the mailpath special zsh parameter (see zshparam(1)). -# -# If no arguments are given mailpath is used. If mailpath is empty, $MAIL -# is used and if that is also empty, /var/spool/mail/$LOGNAME is used. -# This function requires zsh-3.0.1 or newer. -# - -local file message - -for file in "${@:-${mailpath[@]:-${MAIL:-/var/spool/mail/$LOGNAME}}}" -do - message="${${(M)file%%\?*}#\?}" - file="${file%%\?*}" - if [[ -d "$file" ]] then - file=( "$file"/**/*(.ND) ) - if (($#file)) then - checkmail "${^file}\?$message" - fi - elif test -s "$file" -a -N "$file"; then # this also sets $_ to $file - print -r -- "${(e)message:-You have new mail.}" - fi -done -- cgit 1.4.1