.
Last update: 1997-05-20
9945-2-122 _____________________________________________________________________________ Topic: mailx command argument expansion for filenames Relevant Sections: 4.40.7.2 Defect Report: ----------------------- Date: Thu, 4 May 1995 09:51:46 -0700 From: [email protected] (ken dawson [contractor]) Dear Standards Board, I would like to request a formal interpretation on the following issue concerning the mailx utility in POSIX.2. In section 4.40.7.2 (P348, L6566-6570), it says: File names, where expected, shall be subjected to the process of shell word expansions (see 3.6); if more than a single pathname results and the command is expecting one file, the effects are unspecified. If the file name begins with an unquoted plus sign, it shall not be expanded, but treated as the named file (less the leading plus) in the folder directory. (See the folder variable.) While this language is clear, the actual historical behavior of this command should be expressed as follows (change bars are supplied on the left) : File names, where expected, shall be subjected to the following transformations, in sequence: If the file name begins with an unquoted plus sign, and the folder variable is defined (see the folder variable), the plus sign shall be replaced by the value of the folder variable followed by a slash; if the folder variable is unset or is set to null, the filename shall be unchanged. Shell word expansions shall be applied to the file name (see 3.6); if more than a single pathname results from this expansion and the command is expecting one file, the effects are unspecified. I believe that this variance from actual historic practice was not intended. The rationale for mailx seems to carefully point out the cases where the standard differs from historic practice, but does not mention this issue. Interpretation response ------------------------ The standard states the behavior for file name expansion in mailx and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale ------------- None. Forwarded to Interpretations group: May 16 1995 Proposed resolution forwarded: Aug 11 1995 Finalized: Sept 12 1995