mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 09:17:59 +01:00
add some missing argCount specs to commands
This commit is contained in:
@@ -287,11 +287,9 @@ liberator.Bookmarks = function () //{{{
|
||||
"Delete a bookmark",
|
||||
function (args)
|
||||
{
|
||||
var url = args;
|
||||
if (!url)
|
||||
url = liberator.buffer.URL;
|
||||
let url = args || liberator.buffer.URL;
|
||||
let deletedCount = liberator.bookmarks.remove(url);
|
||||
|
||||
var deletedCount = liberator.bookmarks.remove(url);
|
||||
liberator.echo(deletedCount + " bookmark(s) with url `" + url + "' deleted", liberator.commandline.FORCE_SINGLELINE);
|
||||
},
|
||||
{ completer: function (filter) [0, liberator.bookmarks.get(filter)] });
|
||||
|
||||
@@ -675,7 +675,10 @@ liberator.Buffer = function () //{{{
|
||||
liberator.options.setPref("print.show_print_progress", spp);
|
||||
liberator.echo("Print job sent.");
|
||||
},
|
||||
{ bang: true });
|
||||
{
|
||||
argCount: "0",
|
||||
bang: true
|
||||
});
|
||||
|
||||
liberator.commands.add(["pa[geinfo]"],
|
||||
"Show various page information",
|
||||
@@ -724,7 +727,10 @@ liberator.Buffer = function () //{{{
|
||||
//else
|
||||
saveDocument(window.content.document, special);
|
||||
},
|
||||
{ bang: true, });
|
||||
{
|
||||
argCount: "0",
|
||||
bang: true
|
||||
});
|
||||
|
||||
liberator.commands.add(["st[op]"],
|
||||
"Stop loading",
|
||||
@@ -795,7 +801,10 @@ liberator.Buffer = function () //{{{
|
||||
liberator.commands.add(["vie[wsource]"],
|
||||
"View source code of current document",
|
||||
function (args, special) { liberator.buffer.viewSource(args, special); },
|
||||
{ bang: true });
|
||||
{
|
||||
argCount: "1",
|
||||
bang: true
|
||||
});
|
||||
|
||||
liberator.commands.add(["zo[om]"],
|
||||
"Set zoom value of current web page",
|
||||
|
||||
@@ -677,14 +677,11 @@ liberator.Events = function () //{{{
|
||||
|
||||
liberator.commands.add(["delmac[ros]"],
|
||||
"Delete macros",
|
||||
function (args)
|
||||
function (args) { liberator.events.deleteMacros(args); },
|
||||
{
|
||||
if (!args)
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
else
|
||||
liberator.events.deleteMacros(args);
|
||||
},
|
||||
{ completer: function (filter) liberator.completion.macro(filter) });
|
||||
argCount: "+", // pattern might contain whitespace
|
||||
completer: function (filter) liberator.completion.macro(filter)
|
||||
});
|
||||
|
||||
liberator.commands.add(["macros"],
|
||||
"List all macros",
|
||||
@@ -698,14 +695,11 @@ liberator.Events = function () //{{{
|
||||
|
||||
liberator.commands.add(["pl[ay]"],
|
||||
"Replay a recorded macro",
|
||||
function (args)
|
||||
function (args) { liberator.events.playMacro(args); },
|
||||
{
|
||||
if (!args)
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
else
|
||||
liberator.events.playMacro(args);
|
||||
},
|
||||
{ completer: function (filter) liberator.completion.macro(filter) });
|
||||
argCount: "1",
|
||||
completer: function (filter) liberator.completion.macro(filter)
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
||||
|
||||
@@ -178,13 +178,10 @@ liberator.IO = function () //{{{
|
||||
},
|
||||
{ completer: function (filter) liberator.completion.file(filter, true) });
|
||||
|
||||
// NOTE: this command is only used in :source
|
||||
liberator.commands.add(["fini[sh]"],
|
||||
"Stop sourcing a script file",
|
||||
function ()
|
||||
{
|
||||
// this command is only used in :source
|
||||
liberator.echoerr("E168: :finish used outside of a sourced file");
|
||||
},
|
||||
function () { liberator.echoerr("E168: :finish used outside of a sourced file"); },
|
||||
{ argCount: "0" });
|
||||
|
||||
liberator.commands.add(["pw[d]"],
|
||||
|
||||
@@ -188,7 +188,10 @@ const liberator = (function () //{{{
|
||||
return [0, liberator.completion.filter(liberator.config.dialogs || [], filter)];
|
||||
}
|
||||
},
|
||||
{ bang: true });
|
||||
{
|
||||
argCount: "1",
|
||||
bang: true
|
||||
});
|
||||
|
||||
// TODO: move this
|
||||
function getMenuItems()
|
||||
@@ -485,6 +488,7 @@ const liberator = (function () //{{{
|
||||
}
|
||||
},
|
||||
{
|
||||
argCount: "+",
|
||||
bang: true,
|
||||
completer: function (filter)
|
||||
{
|
||||
|
||||
@@ -358,7 +358,10 @@ liberator.Tabs = function () //{{{
|
||||
liberator.execute(args);
|
||||
liberator.forceNewTab = false;
|
||||
},
|
||||
{ completer: function (filter) liberator.completion.ex(filter) });
|
||||
{
|
||||
argCount: "+",
|
||||
completer: function (filter) liberator.completion.ex(filter)
|
||||
});
|
||||
|
||||
liberator.commands.add(["tabl[ast]", "bl[ast]"],
|
||||
"Switch to the last tab",
|
||||
|
||||
@@ -302,7 +302,7 @@ liberator.config = { //{{{
|
||||
"Close the sidebar window",
|
||||
function ()
|
||||
{
|
||||
if (document.getElementById("sidebar-box").hidden == false)
|
||||
if (!document.getElementById("sidebar-box").hidden)
|
||||
toggleSidebar();
|
||||
},
|
||||
{ argCount: "0" });
|
||||
|
||||
@@ -24,7 +24,7 @@ ________________________________________________________________________________
|
||||
|
||||
|
||||
|:delmac| |:delmacros|
|
||||
||:delmac[ros] [args]|| +
|
||||
||:delmac[ros] {args}|| +
|
||||
________________________________________________________________________________
|
||||
Delete recorded macros matching the regular expression [args].
|
||||
________________________________________________________________________________
|
||||
|
||||
Reference in New Issue
Block a user