1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-23 20:13:31 +01:00

Clarify some arg counts and some related tests.

--HG--
extra : rebase_source : e50c757b46406988b0bfa0c179ec1e9bad21a446
This commit is contained in:
Doug Kearns
2011-06-29 20:11:22 +10:00
parent 07bd83d7e4
commit ab7ad88b21
9 changed files with 228 additions and 66 deletions

View File

@@ -1886,7 +1886,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
util.rehash(args);
},
{
argCount: "0",
argCount: "0", // FIXME
options: [
{
names: ["+u"],
@@ -2024,7 +2024,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
dactyl.echoerr(e);
}
}, {
argCount: "+",
argCount: "1",
bang: true,
completer: function (context) {
if (/^:/.test(context.filter))
@@ -2055,7 +2055,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
vbs.setFrom = setFrom;
}
}, {
argCount: "+",
argCount: "1",
completer: function (context) completion.ex(context),
count: true,
literal: 0,

View File

@@ -1620,6 +1620,7 @@ var Events = Module("events", {
else
dactyl.echoerr(_("error.argumentRequired"));
}, {
argCount: "?",
bang: true,
completer: function (context) completion.macro(context),
literal: 0

View File

@@ -621,16 +621,14 @@ var Tabs = Module("tabs", {
commands.add(["keepa[lt]"],
"Execute a command without changing the current alternate buffer",
function (args) {
let alternate = tabs.alternate;
try {
dactyl.execute(args[0], null, true);
}
finally {
tabs.updateSelectionHistory([tabs.getTab(), alternate]);
tabs.updateSelectionHistory([tabs.getTab(), tabs.alternate]);
}
}, {
argCount: "+",
argCount: "1",
completer: function (context) completion.ex(context),
literal: 0,
subCommand: 0
@@ -644,7 +642,7 @@ var Tabs = Module("tabs", {
dactyl.execute(args[0], null, true);
});
}, {
argCount: "+",
argCount: "1",
completer: function (context) completion.ex(context),
literal: 0,
subCommand: 0