summaryrefslogtreecommitdiff
path: root/Functions/checkmail
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-12 22:59:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-12 22:59:04 +0000
commit8d1b4b1358db02d6c9426e4bb3553583e11bf112 (patch)
treea3095364536d55f8356ac99559e440cc91f33eb1 /Functions/checkmail
parent5714953c514a5fea35dcd819caf1afef4d92a13b (diff)
downloadzsh-8d1b4b1358db02d6c9426e4bb3553583e11bf112.tar.gz
zsh-8d1b4b1358db02d6c9426e4bb3553583e11bf112.zip
Sync up with zsh-3_1_6-pws-1.
Diffstat (limited to 'Functions/checkmail')
-rw-r--r--Functions/checkmail26
1 files changed, 0 insertions, 26 deletions
diff --git a/Functions/checkmail b/Functions/checkmail
deleted file mode 100644
index 9cc743db4..000000000
--- a/Functions/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