The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] BSD mail(1) line addressing
@ 2016-09-12  0:43 stanley lieber
  2016-09-12  9:02 ` markus schnalke
  2016-09-12 12:34 ` Steffen Nurpmeso
  0 siblings, 2 replies; 3+ messages in thread
From: stanley lieber @ 2016-09-12  0:43 UTC (permalink / raw)


An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20160911/2c46329a/attachment.html>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [TUHS] BSD mail(1) line addressing
  2016-09-12  0:43 [TUHS] BSD mail(1) line addressing stanley lieber
@ 2016-09-12  9:02 ` markus schnalke
  2016-09-12 12:34 ` Steffen Nurpmeso
  1 sibling, 0 replies; 3+ messages in thread
From: markus schnalke @ 2016-09-12  9:02 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

[2016-09-11 20:43] stanley lieber <sl at stanleylieber.com>
>
> 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

Maybe there was an influence from MH, where it would be written:

	show 1-5

This snippet from FreeBSD's manpage for mail(1) could have been
part of some MH documentation as well:

   Specifying Messages
     Commands such as print and delete can be given a list of message numbers
     as arguments to apply to a number of messages at once.  Thus ``delete 1
     2'' deletes messages 1 and 2, while ``delete 1-5'' deletes messages 1
     through 5. [...]


MH was created at RAND Corporation in 1977/78. In the early eighties,
the University of California at Irvine took over the development.

But as BSD Mail was created already in 1978, it doesn't sound too
valid ...

Maybe someone else can provide better information than my guessing.
;-)


meillo


P.S.
In our development of mmh (a modern version of MH) we currently happen
to feel limited with the ``1-5'' specification, because it hinders us
doing calculations as the ed-like ``1,20-4'' (from one to twenty minus
four). Or more real-life-oriented with symbolic names: ``l-2'' -- the
second to last message. As the minus sign is already taken for ranges,
we have to invent some new syntax or break compatibility or rely on
guessing what seems to have been meant. The MH guys would better have
done it the ed way, back then!


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [TUHS] BSD mail(1) line addressing
  2016-09-12  0:43 [TUHS] BSD mail(1) line addressing stanley lieber
  2016-09-12  9:02 ` markus schnalke
@ 2016-09-12 12:34 ` Steffen Nurpmeso
  1 sibling, 0 replies; 3+ messages in thread
From: Steffen Nurpmeso @ 2016-09-12 12:34 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-12 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12  0:43 [TUHS] BSD mail(1) line addressing stanley lieber
2016-09-12  9:02 ` markus schnalke
2016-09-12 12:34 ` Steffen Nurpmeso

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).