mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:18:00 +01:00
make use of our argsParser to handle commands with a fixed number of arguments.
Also added args.string to access the original string before it was parsed. TODO: Always pass a parseArgs-like structure to commands, instead of only when options or argCount is specified?
This commit is contained in:
@@ -230,14 +230,9 @@ const liberator = (function () //{{{
|
||||
"Execute Normal mode commands",
|
||||
function (args, special)
|
||||
{
|
||||
if (!args)
|
||||
{
|
||||
liberator.echoerr("E471: Argument required");
|
||||
return;
|
||||
}
|
||||
|
||||
liberator.events.feedkeys(args, special);
|
||||
});
|
||||
liberator.events.feedkeys(args.string, special);
|
||||
},
|
||||
{ argCount: "+" });
|
||||
|
||||
liberator.commands.add(["q[uit]"],
|
||||
liberator.has("tabs") ? "Quit current tab" : "Quit application",
|
||||
|
||||
Reference in New Issue
Block a user