diff options
Diffstat (limited to 'etc/.zprofile')
-rw-r--r-- | etc/.zprofile | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/etc/.zprofile b/etc/.zprofile index 2b8312d..d188205 100644 --- a/etc/.zprofile +++ b/etc/.zprofile @@ -18,7 +18,19 @@ pr_info "This is %F{cyan}$(uname -srm)%F{default} on %F{cyan}%y%F{default}" echo -[[ -n $(echo Maildir/new/*(N)) ]] && pr_info "You have mail!" +function { + typeset -a new_mail + + setopt local_options + setopt hist_subst_pattern + + new_mail=(~/Maildir/**/new(DF:h:s/*\\/Maildir\\/./)) + + if (( $#new_mail )); then + pr_info "Unread mail in: ${(j(, ))new_mail}" + fi +} + [[ -r ${ZDIR}/local-profile ]] && source ${ZDIR}/local-profile if [[ ${HOST} == (descent|saviour) && -z ${SSH_CONNECTION} && \ |