1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 09:17:59 +01:00

Cleanup main.jsm. Add (currently disabled) command cacheing.

This commit is contained in:
Kris Maglione
2011-10-06 06:39:41 -04:00
parent 0319712917
commit f65aaea14d
10 changed files with 238 additions and 129 deletions

View File

@@ -1611,6 +1611,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (args.trailing)
storage.session.rehashCmd = args.trailing; // Hack.
args.break = true;
if (args["+purgecaches"])
cache.flush();
util.rehash(args);
},
{
@@ -1620,7 +1624,12 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
commands.add(["res[tart]"],
"Force " + config.host + " to restart",
function (args) { dactyl.restart(args.string); },
function (args) {
if (args["+purgecaches"])
cache.flush();
dactyl.restart(args.string);
},
{
argCount: "0",
options: startupOptions
@@ -1838,9 +1847,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
args = dactyl.parseCommandLine(args);
if (args) {
if (args["+purgecaches"])
cache.flush();
dactyl.commandLineOptions.rcFile = args["+u"];
dactyl.commandLineOptions.noPlugins = "++noplugin" in args;
dactyl.commandLineOptions.postCommands = args["+c"];