Basilisk - the cmd line - help (the columns alignment, error improvements)

https://github.com/MoonchildProductions/moebius/pull/58
This commit is contained in:
janekptacijarabaci 2018-02-28 08:49:42 +01:00 committed by Roy Tam
commit e1f7b9e459
5 changed files with 38 additions and 32 deletions

View file

@ -454,16 +454,16 @@ nsBrowserContentHandler.prototype = {
get helpInfo() {
let info =
" --browser Open a browser window.\n" +
" --new-window <url> Open <url> in a new window.\n" +
" --new-tab <url> Open <url> in a new tab.\n" +
" --private-window <url> Open <url> in a new private window.\n";
" --browser Open a browser window.\n" +
" --new-window <url> Open <url> in a new window.\n" +
" --new-tab <url> Open <url> in a new tab.\n" +
" --private-window <url> Open <url> in a new private window.\n";
if (AppConstants.platform == "win") {
info += " --preferences Open Options dialog.\n";
info += " --preferences Open Options dialog.\n";
} else {
info += " --preferences Open Preferences dialog.\n";
info += " --preferences Open Preferences dialog.\n";
}
info += " --search <term> Search <term> with your default search engine.\n";
info += " --search <term> Search <term> with your default search engine.\n";
return info;
},

View file

@ -21,7 +21,7 @@ nsSetDefaultBrowser.prototype = {
}
},
helpInfo: " --setDefaultBrowser Set this app as the default browser.\n",
helpInfo: " --setDefaultBrowser Set this app as the default browser.\n",
classID: Components.ID("{F57899D0-4E2C-4ac6-9E29-50C736103B0C}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),

View file

@ -190,7 +190,10 @@ DevToolsStartup.prototype = {
listener.open();
dump("Started debugger server on " + portOrPath + "\n");
} catch (e) {
dump("Unable to start debugger server on " + portOrPath + ": " + e);
let _error = "Unable to start debugger server on " + portOrPath + ": "
+ e;
Cu.reportError(_error);
dump(_error + "\n");
}
if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
@ -199,12 +202,14 @@ DevToolsStartup.prototype = {
},
/* eslint-disable max-len */
helpInfo: " --jsconsole Open the Browser Console.\n" +
" --jsdebugger Open the Browser Toolbox.\n" +
" --devtools Open DevTools on initial load.\n" +
" --start-debugger-server [ws:][ <port> | <path> ] Start the debugger server on\n" +
" a TCP port or Unix domain socket path. Defaults to TCP port\n" +
" 6000. Use WebSocket protocol if ws: prefix is specified.\n",
helpInfo: " --jsconsole Open the Browser Console.\n" +
" --jsdebugger Open the Browser Toolbox.\n" +
" --devtools Open DevTools on initial load.\n" +
" --start-debugger-server [ws:][<port>|<path>] Start the debugger server on\n" +
" a TCP port or Unix domain socket path.\n" +
" Defaults to TCP port 6000.\n" +
" Use WebSocket protocol if ws: prefix\n" +
" is specified.\n",
/* eslint-disable max-len */
classID: Components.ID("{9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}"),

View file

@ -67,8 +67,8 @@ RecordingCmdLineHandler.prototype =
cmdLine.preventDefault = true;
},
helpInfo : " --recording <file> Record drawing for a given URL.\n" +
" --recording-output <file> Specify destination file for a drawing recording.\n"
helpInfo : " --recording <file> Record drawing for a given URL.\n" +
" --recording-output <file> Specify destination file for a drawing recording.\n"
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RecordingCmdLineHandler]);

View file

@ -1590,28 +1590,29 @@ DumpHelp()
#ifdef MOZ_X11
printf("X11 options\n"
" --display=DISPLAY X display to use\n"
" --sync Make X calls synchronous\n");
" --display=DISPLAY X display to use.\n"
" --sync Make X calls synchronous.\n");
#endif
#ifdef XP_UNIX
printf(" --g-fatal-warnings Make all warnings fatal\n"
printf(" --g-fatal-warnings Make all warnings fatal.\n"
"\n%s options\n", gAppData->name);
#endif
printf(" -h or --help Print this message.\n"
" -v or --version Print %s version.\n"
" -P <profile> Start with <profile>.\n"
" --profile <path> Start with profile at <path>.\n"
" --migration Start with migration wizard.\n"
" --ProfileManager Start with ProfileManager.\n"
" --no-remote Do not accept or send remote commands; implies\n"
" --new-instance.\n"
" --new-instance Open new instance, not a new window in running instance.\n"
" --UILocale <locale> Start with <locale> resources as UI Locale.\n"
" --safe-mode Disables extensions and themes for this session.\n", gAppData->name);
printf(" -h or --help Print this message.\n"
" -v or --version Print %s version.\n"
" -P <profile> Start with <profile>.\n"
" --profile <path> Start with profile at <path>.\n"
" --migration Start with migration wizard.\n"
" --ProfileManager Start with ProfileManager.\n"
" --no-remote Do not accept or send remote commands;\n"
" implies --new-instance.\n"
" --new-instance Open new instance, not a new window\n"
" in running instance.\n"
" --UILocale <locale> Start with <locale> resources as UI Locale.\n"
" --safe-mode Disables extensions and themes for this session.\n", (const char*) gAppData->name);
#if defined(XP_WIN)
printf(" --console Start %s with a debugging console.\n", gAppData->name);
printf(" --console Start %s with a debugging console.\n", (const char*) gAppData->name);
#endif
// this works, but only after the components have registered. so if you drop in a new command line handler, --help