|Anonymous | Login||2021-01-17 21:37 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001176||[1003.1(2016/18)/Issue7+TC2] Shell and Utilities||Editorial||Error||2017-12-08 15:39||2019-11-08 10:51|
|Organization||The Open Group|
|Final Accepted Text|
|Summary||0001176: mailx file operand description refers to a file option-argument|
The mailx OPERANDS section contains this text in the description of
the file operand:
The meaning of the file option-argument shall be affected
by the contents of the folder internal variable
The use of "option-argument" here is an editorial error; it should
the file option-argument
the file operand
I agree it looks like an operand, but since the file is only valid when -f option present, it's more the Synopsis is in error to me.
Suggest Change P2943, L97435 from:
mailx −f [−HiNn] [−F] [file]
mailx −f [file] [−FHiNn]
to show it is the optional argument to -f, not has significance by itself.
The (i think even historical but had to look as necessary) behaviour is that the operand of -f is taken from the command line if all other options have been worked.
It is not an optional argument of -f.
Me and the MUA i maintain document it as
-f Read in the contents of the user's secondary mailbox
MBOX (or the specified file) for processing; when XXX is
quit, it writes undeleted messages back to this file (but be aware
of the hold option). The optional file argument will undergo
some special Filename transformations (also see file).
Note that file is not an argument to the flag -f, but is instead
taken from the command line after option processing has been com‐
pleted. In order to use a file that starts with a hyphen-minus,
prefix with a relative path, as in ‘./-hyphenbox.mbox’.
This is with manual links (mdocmx) and possibly too lengthy for the standard, i presume.
Have a nice weekend!
Historically the syntax was -f [file] i.e. -f had an optional option-argument.
POSIX doesn't allow this, and so -f was changed to a "plain" option with [file] as an optional operand, so that "mailx -f" to open ~/mbox would still work.
See the mailx RATIONALE:
In order to conform to the Utility Syntax Guidelines, a solution was required to the optional file option-argument to -f. By making file an operand, the guidelines are satisfied and users remain portable. However, it does force implementations to support usage such as:mailx -fin mymail.box
|As POSIX does allow optional option-arguments, in XBD 12.1, line 7214, it looked to me the intent was distinguishing the separate synopsis case by separating it from the argument but still characterizing it as an option-argument, as one of the syntax exceptions line 7206 accounts for, and permits the usages "mailx -f", "mailx -inf", "mailx -fmail.box", "mailx -infmail.box" and "mailx -inf mail.box", but not "mailx -fin mail.box". This may be a breaking change, not simply editorial, in other words.|
Thank you. Indeed! In full: non-optional for 2BSD Mail, optional only at the end of the command line (blindly taking next argument otherwise) for 3BSD and 7th and 8th Edition. Earlier Unix mail no such option.
|Re Note: 0003895, XBD 12.1 line 7214 relates to a few rare exceptions to the syntax rules. See lines 7204-7207. The original POSIX.2-1992 developers decided not to make an exception to those rules in the case of mailx -f but instead to change file to be an operand.|
|2017-12-08 15:39||geoffclare||New Issue|
|2017-12-08 15:39||geoffclare||Name||=> Geoff Clare|
|2017-12-08 15:39||geoffclare||Organization||=> The Open Group|
|2017-12-08 15:39||geoffclare||Section||=> mailx|
|2017-12-08 15:39||geoffclare||Page Number||=> 2944|
|2017-12-08 15:39||geoffclare||Line Number||=> 97497|
|2017-12-08 15:39||geoffclare||Interp Status||=> ---|
|2017-12-09 14:30||shware_systems||Note Added: 0003892|
|2017-12-09 15:47||steffen||Note Added: 0003893|
|2017-12-11 09:43||geoffclare||Note Added: 0003894|
|2017-12-11 13:35||shware_systems||Note Added: 0003895|
|2017-12-11 15:06||steffen||Note Added: 0003896|
|2017-12-11 15:16||geoffclare||Note Added: 0003897|
|2019-02-14 16:59||Don Cragun||Status||New => Resolved|
|2019-02-14 16:59||Don Cragun||Resolution||Open => Accepted|
|2019-02-14 16:59||Don Cragun||Tag Attached: tc3-2008|
|2019-11-08 10:51||geoffclare||Status||Resolved => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|