From f09f6120e75736503eb0897504ae3e35d458f114 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 10 Nov 2009 04:52:26 +1100 Subject: [PATCH] Fix -{config.name} command-line processing. --HG-- extra : rebase_source : 452d953121c4b28ea1585842710e0c74b4bef348 --- common/content/liberator.js | 7 +++---- muttator/components/commandline-handler.js | 2 +- vimperator/components/commandline-handler.js | 2 +- xulmus/components/commandline-handler.js | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index 384a9f31..c9124b7a 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -136,8 +136,8 @@ const Liberator = Module("liberator", { /** * @property {Object} The map of command-line options. These are - * specified in the argument to the host application's -liberator - * option. E.g. $ firefox -liberator '+u=tempRcFile ++noplugin' + * specified in the argument to the host application's -{config.name} + * option. E.g. $ firefox -vimperator '+u=/tmp/rcfile ++noplugin' * Supported options: * +u=RCFILE Use RCFILE instead of .vimperatorrc. * ++noplugin Don't load plugins. @@ -1734,8 +1734,7 @@ const Liberator = Module("liberator", { liberator.log("All modules loaded", 3); - services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name.toLowerCase(), - Ci.nsICommandLineHandler); + services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name.toLowerCase()); let commandline = services.get("commandLineHandler").optionValue; if (commandline) { diff --git a/muttator/components/commandline-handler.js b/muttator/components/commandline-handler.js index 5385dd7b..fe2d0fd9 100644 --- a/muttator/components/commandline-handler.js +++ b/muttator/components/commandline-handler.js @@ -35,7 +35,7 @@ CommandLineHandler.prototype = { this.optionValue = commandLine.handleFlagWithParam(name, false); } catch (e) { - //"vimperator: option -vimperator requires an argument" + dump(name + ": option '-" + name + "' requires an argument\n"); } } }; diff --git a/vimperator/components/commandline-handler.js b/vimperator/components/commandline-handler.js index 4c7ee490..4fe1c51c 100644 --- a/vimperator/components/commandline-handler.js +++ b/vimperator/components/commandline-handler.js @@ -35,7 +35,7 @@ CommandLineHandler.prototype = { this.optionValue = commandLine.handleFlagWithParam(name, false); } catch (e) { - //"vimperator: option -vimperator requires an argument" + dump(name + ": option '-" + name + "' requires an argument\n"); } } }; diff --git a/xulmus/components/commandline-handler.js b/xulmus/components/commandline-handler.js index 4c098479..b4e07299 100644 --- a/xulmus/components/commandline-handler.js +++ b/xulmus/components/commandline-handler.js @@ -35,7 +35,7 @@ CommandLineHandler.prototype = { this.optionValue = commandLine.handleFlagWithParam(name, false); } catch (e) { - //"vimperator: option -vimperator requires an argument" + dump(name + ": option '-" + name + "' requires an argument\n"); } } };