|--==> "SJT" == Stephen J Turnbull <stephen(a)xemacs.org> writes:
SJT> Note: I just realized that the "--" syntax is not helpful on the
SJT> XEmacs command line, as you cannot do the following any more:
SJT> xemacs -something -f turn--something-into-something-more-useful
SJT> as both
SJT> xemacs -- -something -f turn--something-into-something-more-useful
SJT> xemacs -f turn--something-into-something-more-useful -- -something
SJT> are obviously incorrect. ;-)
SJT> We really need an "escape-once" flag, something like
--file=-something,
SJT> here.
How about '\' to be used in front of a filename that starts with '-'.
To extend on that, if a command line arg:
o Starts with a dash, it's an option. If it isn't a legal
option, XEmacs should quit with an unknown command error and
display some terse usage.
o Starts with anything else, it's a filename unless it is
preceded by a legal option that in itself takes an argument
o Starts with a dash _and_ is supposed to be a filename,
escape it with '\'
So Steve's example could be:
xemacs \-something -f turn-something-into-something-more-useful
and...
xemacs -something -f turn-something-into-something-more-useful
should result in an unknown option error: '-something' (+ appropriate
usage help, perhaps with a tip about escaping filenames).
--
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|