Date: Sun, 6 Aug 1995 17:03:49 +0200 From: Wolfram Schneider <wosch@cs.tu-berlin.de> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/657: mail(1): comments in ~/.mailrc Message-ID: <199508061503.RAA02968@localhost> Resent-Message-ID: <199508070020.RAA22751@freefall.cdrom.com>
next in thread | raw e-mail | index | archive | help
>Number: 657 >Category: bin >Synopsis: mail(1): comments in ~/.mailrc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 6 17:20:01 PDT 1995 >Last-Modified: >Originator: Wolfram Schneider >Organization: >Release: FreeBSD 2.0-ALPHA i386 >Environment: >Description: '#' is not a comment if a non-space char follow >How-To-Repeat: $ echo '#foo' >> ~/.mailrc $ echo foo | mail /dev/null Unknown command: "#foo" >Fix: --- 1.1 1995/08/06 11:39:22 +++ lex.c 1995/08/06 12:03:10 @@ -458,6 +458,17 @@ register struct cmd *cp; extern struct cmd cmdtab[]; + /* + * ignore trailing chars after `#' + * + * lines with beginning `#' are comments + * spaces befor `#' are ignored in execute() + */ + + if (*word == '#') + *(word+1) = '\0'; + + for (cp = &cmdtab[0]; cp->c_name != NOSTR; cp++) if (isprefix(word, cp->c_name)) return(cp); >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508061503.RAA02968>