On 10/23/14 9:20 PM, Nicholas Nethercote wrote:
Hello.

Our command-line option handling is *interesting*. Did you know that:

- our options work in -foo form and --foo form;

- they are case-insensitive;

- this holds for both short options (e.g. -h) and long options (e.g. -help).
I did in fact know this, but I may be one of the few. This dates back to the pre-FF1.0 days where we had different startup paths for windows/mac/linux each of which had their own arg handling code with different expectations. My decision was to accept all the different varieties of argument and treat them equivalently.

At least, all this is true for the options that are processed via the main
option-processing code. Some of our options are handled elsewhere, via ad hoc
code that is generally less flexible.
Can you point me to this? Pretty much any code handling command lines should either be use the nsAppRunner code or using the nsICommandLine APIs.

Before I land those patches, I thought I would ask here if anyone can see any
reason not to do this. Remember, it's not a functional change -- both -foo and
--foo options will still work -- it's just a documentation change.
Doesn't matter to me.

Another obvious
follow-up is to drop support for -foo options, but that's *much* harder, so I
haven't even bothered filing a bug about that.
I don't think we should ever do this. It would break some existing user for no apparent benefit other that consistency with "standard" command-line conventions.

--BDS

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to