1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 18:47:58 +01:00

Fix -{config.name} command-line processing.

--HG--
extra : rebase_source : 452d953121c4b28ea1585842710e0c74b4bef348
This commit is contained in:
Doug Kearns
2009-11-10 04:52:26 +11:00
parent 4658d7e211
commit f09f6120e7
4 changed files with 6 additions and 7 deletions

View File

@@ -136,8 +136,8 @@ const Liberator = Module("liberator", {
/** /**
* @property {Object} The map of command-line options. These are * @property {Object} The map of command-line options. These are
* specified in the argument to the host application's -liberator * specified in the argument to the host application's -{config.name}
* option. E.g. $ firefox -liberator '+u=tempRcFile ++noplugin' * option. E.g. $ firefox -vimperator '+u=/tmp/rcfile ++noplugin'
* Supported options: * Supported options:
* +u=RCFILE Use RCFILE instead of .vimperatorrc. * +u=RCFILE Use RCFILE instead of .vimperatorrc.
* ++noplugin Don't load plugins. * ++noplugin Don't load plugins.
@@ -1734,8 +1734,7 @@ const Liberator = Module("liberator", {
liberator.log("All modules loaded", 3); liberator.log("All modules loaded", 3);
services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name.toLowerCase(), services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name.toLowerCase());
Ci.nsICommandLineHandler);
let commandline = services.get("commandLineHandler").optionValue; let commandline = services.get("commandLineHandler").optionValue;
if (commandline) { if (commandline) {

View File

@@ -35,7 +35,7 @@ CommandLineHandler.prototype = {
this.optionValue = commandLine.handleFlagWithParam(name, false); this.optionValue = commandLine.handleFlagWithParam(name, false);
} }
catch (e) { catch (e) {
//"vimperator: option -vimperator requires an argument" dump(name + ": option '-" + name + "' requires an argument\n");
} }
} }
}; };

View File

@@ -35,7 +35,7 @@ CommandLineHandler.prototype = {
this.optionValue = commandLine.handleFlagWithParam(name, false); this.optionValue = commandLine.handleFlagWithParam(name, false);
} }
catch (e) { catch (e) {
//"vimperator: option -vimperator requires an argument" dump(name + ": option '-" + name + "' requires an argument\n");
} }
} }
}; };

View File

@@ -35,7 +35,7 @@ CommandLineHandler.prototype = {
this.optionValue = commandLine.handleFlagWithParam(name, false); this.optionValue = commandLine.handleFlagWithParam(name, false);
} }
catch (e) { catch (e) {
//"vimperator: option -vimperator requires an argument" dump(name + ": option '-" + name + "' requires an argument\n");
} }
} }
}; };