Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

mailcheck patch



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)




Messages sorted by: Reverse Date, Date, Thread, Author