From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id EAA14695 for ; Sat, 25 May 1996 04:43:11 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA26499; Fri, 24 May 1996 14:20:33 -0400 (EDT) Resent-Date: Fri, 24 May 1996 14:20:33 -0400 (EDT) Date: Fri, 24 May 1996 19:18:56 +0100 Message-Id: <199605241818.TAA23634@et-sun4.uk.jpmorgan.com> From: Anthony Heading To: zsh-workers@math.gatech.edu Subject: mailcheck patch Resent-Message-ID: <"XQzgp.0.zT6.ntVfn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1170 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I've had this patch kicking around for a year or two, and find it quite useful. Perhaps it might be worth incorporating? Anthony *** Src/utils.c.orig Mon May 20 13:40:01 1996 --- Src/utils.c Thu May 23 18:30:23 1996 *************** *** 692,697 **** --- 692,705 ---- if (!u) { fprintf(stderr, "You have new mail.\n"); fflush(stderr); + } else if (*u == '?') { + List list; + if ((list = getshfunc(u+1))) { + LinkList args = newlinklist(); + addlinknode(args, dupstring(u+1)); + addlinknode(args, dupstring(*s)); + doshfunc(list, args, 0, 0); + } } else { char *z = u; *** Doc/zshparam.1.orig Fri May 24 19:03:48 1996 --- Doc/zshparam.1 Fri May 24 19:13:00 1996 *************** *** 397,409 **** .TP .B mailpath (MAILPATH) An array (colon-separated list) ! of filenames to check for new mail. Each filename can ! be followed by a ? and a message that will be printed. ! The sequence $_ in the message will be replaced by the name ! of the mail file. ! The default message is "You have new mail." If an element is a directory ! instead of a file the shell will recursively check every file in every ! subdirectory of the element. .TP .B manpath (MANPATH) An array (colon-separated list) --- 397,410 ---- .TP .B mailpath (MAILPATH) An array (colon-separated list) ! of filenames to check for new mail. Each filename may ! be followed by `?' and a message to be printed: ! the sequence `$_' in the message will be replaced by the name ! of the mail file. The default message is "You have new mail." ! Alternatively, the filename may be followed by `??' and a shell ! function to be called with the mail file name as an argument. ! If an element is a directory instead of a file the shell will ! recursively check every file in every subdirectory of the element. .TP .B manpath (MANPATH) An array (colon-separated list)