From owner-freebsd-bugs Sun Aug 6 17:20:02 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id RAA22760 for bugs-outgoing; Sun, 6 Aug 1995 17:20:02 -0700 Received: (from gnats@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id RAA22751 ; Sun, 6 Aug 1995 17:20:02 -0700 Resent-Date: Sun, 6 Aug 1995 17:20:02 -0700 Resent-Message-Id: <199508070020.RAA22751@freefall.cdrom.com> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.cdrom.com, wosch@cs.tu-berlin.de Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id RAA22595 for ; Sun, 6 Aug 1995 17:19:12 -0700 Received: from localhost.cs.tu-berlin.de ([130.149.1.128]) by mail.cs.tu-berlin.de (8.6.12/8.6.12) with ESMTP id CAA11383 for ; Mon, 7 Aug 1995 02:16:02 +0200 Received: (from wosch@localhost) by localhost (8.6.9/8.6.9) id RAA02968; Sun, 6 Aug 1995 17:03:49 +0200 Message-Id: <199508061503.RAA02968@localhost> Date: Sun, 6 Aug 1995 17:03:49 +0200 From: Wolfram Schneider Reply-To: wosch@cs.tu-berlin.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/657: mail(1): comments in ~/.mailrc Sender: bugs-owner@freebsd.org Precedence: bulk >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: