NetBSD Problem Report #782

From gnats  Fri Feb  3 22:52:09 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id WAA01119 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 3 Feb 1995 22:52:08 -0800
Message-Id: <199502040444.PAA21133@zen.void.oz.au>
Date: Sat, 4 Feb 1995 15:44:31 +1100
From: "Simon J. Gerraty" <sjg@zen.void.oz.au>
Reply-To: sjg@zen.void.oz.au
To: gnats-bugs@netbsd.org
Subject: mail: ~? does not tell user of ~q and there is no ~x
X-Send-Pr-Version: 3.2

>Number:         782
>Category:       bin
>Synopsis:       mail: ~? does not tell user of ~q and there is no ~x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mjl
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 03 23:05:04 +0000 1995
>Closed-Date:    Wed Feb 17 20:34:55 +0000 1999
>Last-Modified:  Wed Feb 17 20:36:33 +0000 1999
>Originator:     Simon J. Gerraty
>Release:        1.0
>Organization:
Zen Programming...
>Environment:

System: NetBSD zen.void.oz.au 1.0 NetBSD 1.0 (ZEN) #6: Tue Dec 13 09:55:20 EST 1994 root@zen.void.oz.au:/usr/src/sys/arch/i386/compile/ZEN i386


>Description:

One tells new users to use ~? to check what commands are available while
writing mail.  However, the list of ~ commands does not mention any 
command to abort the message.  Also, mailx on System V uses ~x for
this purpose.

The patch below, makes ~x equivalent to ~q and mentiones them in the help
screen shown by ~?

>How-To-Repeat:
>Fix:

*** usr.bin/mail/collect.c.~1~	Wed Jun 29 20:35:41 1994
--- usr.bin/mail/collect.c	Sat Feb  4 10:23:46 1995
***************
*** 212,217 ****
--- 212,218 ----
  			 */
  			goto out;
  		case 'q':
+ 		case 'x':			/* like mailx */
  			/*
  			 * Force a quit of sending mail.
  			 * Act like an interrupt happened.
*** usr.bin/mail/misc/mail.tildehelp.~1~	Fri Dec 17 18:14:00 1993
--- usr.bin/mail/misc/mail.tildehelp	Sat Feb  4 10:34:29 1995
***************
*** 4,10 ****
  ~b users	Add users to "blind" cc list
  ~c users	Add users to cc list
  ~d		Read in dead.letter
! ~e		Edit the message buffer
  ~f messages	Read in messages
  ~F messages	Same as ~f, but keep all header lines
  ~h		Prompt for to list, subject and cc list
--- 4,10 ----
  ~b users	Add users to "blind" cc list
  ~c users	Add users to cc list
  ~d		Read in dead.letter
! ~e / ~v		Edit message buffer using EDITOR or VISUAL
  ~f messages	Read in messages
  ~F messages	Same as ~f, but keep all header lines
  ~h		Prompt for to list, subject and cc list
***************
*** 14,21 ****
  ~M messages	Same as ~m, but keep all header lines
  ~s subject	Set subject
  ~t users	Add users to to list
- ~v		Invoke display editor on message
  ~w file		Write message onto file.
  ~?		Print this message
  ~!command	Invoke the shell
  ~|command	Pipe the message through the command
--- 14,21 ----
  ~M messages	Same as ~m, but keep all header lines
  ~s subject	Set subject
  ~t users	Add users to to list
  ~w file		Write message onto file.
+ ~q / ~x		Quit (do not send message)
  ~?		Print this message
  ~!command	Invoke the shell
  ~|command	Pipe the message through the command
>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Sun Feb  5 12:43:20 1995
State-Changed-Why:
This patch is on the right track, but is insufficent.

POSIX.2 requires much of the additional functionality found in mailx.
There are several ~ escapes that are not implemented:

	~A	equivalent to ~i Sign
	~a	equivalent to ~i sign
	~i	insert the value of the named variable.
	~<	read file
	~< !    read pipeline
	~x	exit without writing dead.letter.

Others like ~[fFmM], ~p, etc look like they add additional
requirements/functionality, but I haven't had time to go through them
in detail.

Simply equating 'q' and 'x' won't work because they have different
semantics.


From: "J.T. Conklin" <jtc>
To: Utility Bug People <gnats-admin>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/782: mail: ~? does not tell user of ~q and there is no ~x
Date: Tue, 25 Jul 1995 19:32:45 -0400

 	`J.T. Conklin' made changes to this PR.

 --- /var/tmp/gnats001804	Tue Jul 25 19:31:23 1995
 +++ /var/tmp/gnatsa01804	Tue Jul 25 19:32:36 1995
 @@ -9,12 +9,12 @@
  From: "Simon J. Gerraty" <sjg@zen.void.oz.au>
  Reply-To: sjg@zen.void.oz.au
  To: gnats-bugs@netbsd.org
 -Subject: Mail tilde commands (~x missing)
 +Subject: mail: ~? does not tell user of ~q and there is no ~x
  X-Send-Pr-Version: 3.2

  >Number:         782
  >Category:       bin
 ->Synopsis:       ~? does not tell user of ~q and there is no ~x
 +>Synopsis:       mail: ~? does not tell user of ~q and there is no ~x
  >Confidential:   no
  >Severity:       non-critical
  >Priority:       low
Responsible-Changed-From-To: bin-bug-people->mjl 
Responsible-Changed-By: mjl 
Responsible-Changed-When: Tue Feb 16 13:23:30 PST 1999 
Responsible-Changed-Why:  

jtc is gone. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: mjl 
State-Changed-When: Wed Feb 17 12:34:55 PST 1999 
State-Changed-Why:  

Added missing functionality for POSIX compliance to our mail. 
Completed the tilde help page with missing commands. 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.