Austin Group Defect Tracker

Aardvark Mark IV

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001630 [Online Pubs] Base Definitions Objection Clarification Requested 2023-01-20 21:39 2023-01-20 22:36
Reporter mirabilos View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name mirabilos
Organization mksh
User Reference
URL [^]
Section 3.10
Summary 0001630: Alias names
Description I have a strong objection for alias names beginning with either ‘+’ or ‘-’ (or are exactly “[[” but that’s not yet portable anyway).

This used to not be a problem, but with the recent change to POSIX alias name characters, it has become one.

(This was, indeed, discussed with users who wanted to use +/- as aliases, but there were problems and ambiguities stemming from them (mostly wrt. options), and so mksh denies aliases to start with either of these characters.)
Desired Action    On page 34, lines 1168 ff., change

     3.10 Alias Name
     In the shell command language, a word consisting solely of alphabetics and
     digits from the portable character set and any of the following characters:


     3.10 Alias Name
     In the shell command language, a word consisting solely of alphabetics and
     digits from the portable character set and any of the following characters
     (where '-' may not be used as the first character of the word):
Tags No tags attached.
Attached Files

- Relationships

-  Notes
kre (reporter)
2023-01-20 22:30

As long as we're keeping aliases in the standard at all (no objection to
deleting them, and all that goes with them, from me), their names, just
like function names, should be able to be anything that a (simple) command
name can be, so an alias, or function, can be used to replace/augment any
command that can exist (just not ones containing '/' so using a full path
to defeat the function, or alias, though even that's not as important for
aliases, as quoting some of it also stops an alias from expanding).

Commands can begin with - and + (I use '-' as a shorthand for the nmh "prev"
command, and '+' for its "next" command), so aliases should be able to as

The current text in XBD 3.10 doesn't require support in alias names
for '+' or '-' at all, but it allows that as an implementation extension.

I object to any attempt to restrict things more than is currently done
(note: nothing requires your shell to allow '-' or '+' in alias names
at all, if you do allow them, you can do that however you like, the
standard does not have to forbid a leading '-' for you to do so.)

[[ would be a dangerous alias to attempt to use, as it is on the "might
be a reserved word" list, if it is, then (with standard posix shell practices)
it cannot be used as an alias. If it isn't, I see no reason why that
shouldn't be an alias either.

While I'm here, a procedural note which I think is correct, but someone
more knowledgeable might correct me ... you're filing your recent issues
in the "Online Pubs" category. I think that's wrong - that's intended for
issues with the HTML translation of the (primary) PDF version of the
standard. I don't think it should be used for issues with what the
standard says, or changes/additions requested of that. Use the version
of the standard you're reading (if the HTML version that would be
Issue7+TC2 currently).
kre (reporter)
2023-01-20 22:36
edited on: 2023-01-20 22:38

And I, of course, missed the changes made by 0001050 which is not
in the draft yet.

That makes no difference to my opinion of this, an alias name starting
with (or being entirely) '-' (or '+') is, and should remain, entirely
proper to have.

- Issue History
Date Modified Username Field Change
2023-01-20 21:39 mirabilos New Issue
2023-01-20 21:39 mirabilos Name => mirabilos
2023-01-20 21:39 mirabilos Organization => mksh
2023-01-20 21:39 mirabilos URL => [^]
2023-01-20 21:39 mirabilos Section => 3.10
2023-01-20 22:30 kre Note Added: 0006122
2023-01-20 22:36 kre Note Added: 0006123
2023-01-20 22:38 kre Note Edited: 0006123

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker