On Fri, Oct 24, 2014 at 6:31 AM, Benjamin Smedberg <benja...@smedbergs.us> wrote: >> >> 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.
Patch 1 in bug 1080302 covers four of these places. * http://dxr.mozilla.org/mozilla-central/source/toolkit/xre/nsNativeAppSupportWin.cpp#336 handles -console and /console. My patch adds --console support. * http://dxr.mozilla.org/mozilla-central/source/webapprt/gtk/webapprt.cpp#329 handles -profile and -remove. My patch adds --profile and --remove support. * http://dxr.mozilla.org/mozilla-central/source/webapprt/win/webapprt.cpp#447 handles -profile and /profile. My patch adds --profile support. * http://dxr.mozilla.org/mozilla-central/source/widget/windows/winrt/MetroContracts.cpp#106 handles -url. My patch adds --url and /url support. There's also http://dxr.mozilla.org/mozilla-central/source/mobile/android/base/GeckoApp.java#1151, which handles -P and --profile in a horrendous way. I didn't have to change it because it already matches single- and double-dash forms, AFAICT, but that appears to be by luck rather than design. >> 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. Fair enough. Nick _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform