mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 16:50:58 +01:00
zsh-users/10720: a couple of checkmail fixes
This commit is contained in:
parent
bd4b21bf46
commit
572ad667e7
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
# This function requires zsh-3.0.1 or newer.
|
# This function requires zsh-3.0.1 or newer.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
emulate -L zsh
|
||||||
local file message
|
local file message
|
||||||
|
|
||||||
for file in "${@:-${mailpath[@]:-${MAIL:-/var/spool/mail/$LOGNAME}}}"
|
for file in "${@:-${mailpath[@]:-${MAIL:-/var/spool/mail/$LOGNAME}}}"
|
||||||
|
|
@ -18,7 +19,7 @@ do
|
||||||
if [[ -d "$file" ]] then
|
if [[ -d "$file" ]] then
|
||||||
file=( "$file"/**/*(.ND) )
|
file=( "$file"/**/*(.ND) )
|
||||||
if (($#file)) then
|
if (($#file)) then
|
||||||
checkmail "${^file}\?$message"
|
checkmail ${^file}\?$message
|
||||||
fi
|
fi
|
||||||
elif test -s "$file" -a -N "$file"; then # this also sets $_ to $file
|
elif test -s "$file" -a -N "$file"; then # this also sets $_ to $file
|
||||||
print -r -- "${(e)message:-You have new mail.}"
|
print -r -- "${(e)message:-You have new mail.}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue