The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: steffen@sdaoden.eu (Steffen Nurpmeso)
Subject: [TUHS] BSD mail(1) line addressing
Date: Mon, 12 Sep 2016 14:34:56 +0200	[thread overview]
Message-ID: <20160912123456.6xQx8sec1%steffen@sdaoden.eu> (raw)
In-Reply-To: <20160912004332.4362323.94475.6921@stanleylieber.com>

stanley lieber <sl at stanleylieber.com> wrote:
 |Anyone know what considerations informed the decision (way back when) \
 |to eschew ed-like line addressing and switch to the currently entrenched, \
 |reversed 
 |form?
 |
 |EXAMPLES
 |
 |V8 mail:
 |
 |1,5p # prints messages one through five
 |
 |BSD mail:
 |
 |p1-5 # prints messages one through five

I cannot see any code that would parse the command line, let aside
an ed-style one, in V7 usr/src/cmd/mail.c.  But interesting
question, why that prefix-based command syntax has been thrown
over board.  Maybe, even likely i would say, Kurt Shoens didn't
even do so, what the question implies, but instead the message
specification is the actual argument for the command, instead of
being just an address constrained of it.

For some commands this is a restriction, however, which is why the
laststring() (former getcmd()) has been introduced in the nail
fork.  It backward parses something off the end of the command
line, to overcome ambiguities that would otherwise arise, e.g.,
the `pipe' command takes a message-list and a command.  This is of
course a very bad hack.  Parsing the message-list should be
prepared for not failing once the shell command is reached, and
the shell long has the "--" mechanism for such separating
purposes.  nail(1) has not, maybe mailx(1) will, one day.

--steffen


      parent reply	other threads:[~2016-09-12 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12  0:43 stanley lieber
2016-09-12  9:02 ` markus schnalke
2016-09-12 12:34 ` Steffen Nurpmeso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160912123456.6xQx8sec1%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).