1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:08:00 +01:00

rename Command's bangAllowed property to bang

This commit is contained in:
Doug Kearns
2008-10-04 16:48:32 +00:00
parent 7cd9f28279
commit 2ebb57fe93
11 changed files with 48 additions and 48 deletions

View File

@@ -138,7 +138,7 @@ liberator.Addressbook = function () //{{{
liberator.commands.add(["contacts", "addr[essbook]"], liberator.commands.add(["contacts", "addr[essbook]"],
"List or open multiple addresses", "List or open multiple addresses",
function (args, special) { liberator.addressbook.list(args, special); }, function (args, special) { liberator.addressbook.list(args, special); },
{ bangAllowed: true }); { bang: true });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////

View File

@@ -275,7 +275,7 @@ liberator.Bookmarks = function () //{{{
liberator.bookmarks.list(args.arguments.join(" "), args["-tags"] || [], special); liberator.bookmarks.list(args.arguments.join(" "), args["-tags"] || [], special);
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) [0, liberator.bookmarks.get(filter)], completer: function (filter) [0, liberator.bookmarks.get(filter)],
options: [[["-tags", "-T"], liberator.commands.OPTION_LIST]] options: [[["-tags", "-T"], liberator.commands.OPTION_LIST]]
}); });
@@ -602,7 +602,7 @@ liberator.History = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) completer: function (filter)
{ {
var sh = getWebNavigation().sessionHistory; var sh = getWebNavigation().sessionHistory;
@@ -649,7 +649,7 @@ liberator.History = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) completer: function (filter)
{ {
var sh = getWebNavigation().sessionHistory; var sh = getWebNavigation().sessionHistory;
@@ -670,7 +670,7 @@ liberator.History = function () //{{{
"Show recently visited URLs", "Show recently visited URLs",
function (args, special) { liberator.history.list(args, special); }, function (args, special) { liberator.history.list(args, special); },
{ {
bangAllowed: true, bang: true,
completer: function (filter) [0, liberator.history.get(filter)] completer: function (filter) [0, liberator.history.get(filter)]
}); });
@@ -853,7 +853,7 @@ liberator.QuickMarks = function () //{{{
else else
liberator.quickmarks.remove(args); liberator.quickmarks.remove(args);
}, },
{ bangAllowed: true }); { bang: true });
liberator.commands.add(["qma[rk]"], liberator.commands.add(["qma[rk]"],
"Mark a URL with a letter for quick access", "Mark a URL with a letter for quick access",

View File

@@ -607,7 +607,7 @@ liberator.Buffer = function () //{{{
liberator.options.setPref("print.show_print_progress", spp); liberator.options.setPref("print.show_print_progress", spp);
liberator.echo("Print job sent."); liberator.echo("Print job sent.");
}, },
{ bangAllowed: true }); { bang: true });
liberator.commands.add(["pa[geinfo]"], liberator.commands.add(["pa[geinfo]"],
"Show various page information", "Show various page information",
@@ -637,7 +637,7 @@ liberator.Buffer = function () //{{{
"Reload current page", "Reload current page",
function (args, special) { liberator.tabs.reload(getBrowser().mCurrentTab, special); }, function (args, special) { liberator.tabs.reload(getBrowser().mCurrentTab, special); },
{ {
bangAllowed: true, bang: true,
argCount: "0" argCount: "0"
}); });
@@ -656,7 +656,7 @@ liberator.Buffer = function () //{{{
//else //else
saveDocument(window.content.document, special); saveDocument(window.content.document, special);
}, },
{ bangAllowed: true, }); { bang: true, });
liberator.commands.add(["st[op]"], liberator.commands.add(["st[op]"],
"Stop loading", "Stop loading",
@@ -704,7 +704,7 @@ liberator.Buffer = function () //{{{
liberator.commands.add(["vie[wsource]"], liberator.commands.add(["vie[wsource]"],
"View source code of current document", "View source code of current document",
function (args, special) { liberator.buffer.viewSource(args, special); }, function (args, special) { liberator.buffer.viewSource(args, special); },
{ bangAllowed: true }); { bang: true });
liberator.commands.add(["zo[om]"], liberator.commands.add(["zo[om]"],
"Set zoom value of current web page", "Set zoom value of current web page",
@@ -744,7 +744,7 @@ liberator.Buffer = function () //{{{
else else
liberator.buffer.textZoom = level; liberator.buffer.textZoom = level;
}, },
{ bangAllowed: true }); { bang: true });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PAGE INFO /////////////////////////////////////////////// ////////////////////// PAGE INFO ///////////////////////////////////////////////
@@ -1660,7 +1660,7 @@ liberator.Marks = function () //{{{
liberator.marks.remove(args, special); liberator.marks.remove(args, special);
}, },
{ bangAllowed: true }); { bang: true });
liberator.commands.add(["ma[rk]"], liberator.commands.add(["ma[rk]"],
"Mark current location within the web page", "Mark current location within the web page",

View File

@@ -78,7 +78,7 @@ liberator.Command = function (specs, description, action, extraInfo) //{{{
this.completer = extraInfo.completer || null; this.completer = extraInfo.completer || null;
this.hereDoc = extraInfo.hereDoc || false; this.hereDoc = extraInfo.hereDoc || false;
this.options = extraInfo.options || []; this.options = extraInfo.options || [];
this.bangAllowed = extraInfo.bangAllowed || false; this.bang = extraInfo.bang || false;
this.isUserCommand = extraInfo.isUserCommand || false; this.isUserCommand = extraInfo.isUserCommand || false;
this.replacementText = extraInfo.replacementText || null; this.replacementText = extraInfo.replacementText || null;
@@ -701,7 +701,7 @@ liberator.Commands = function () //{{{
liberator.execute(replaced); liberator.execute(replaced);
}, },
{ {
bangAllowed: true, // FIXME: until we implement -bang bang: true, // FIXME: until we implement -bang
replacementText: rep replacementText: rep
}, },
special) special)
@@ -729,7 +729,7 @@ liberator.Commands = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.userCommand(filter) completer: function (filter) liberator.completion.userCommand(filter)
/*options: [[["-nargs"], OPTION_STRING, function (arg) { return /^(0|1|\*|\?|\+)$/.test(arg); }], /*options: [[["-nargs"], OPTION_STRING, function (arg) { return /^(0|1|\*|\?|\+)$/.test(arg); }],
[["-bang"], OPTION_NOARG], [["-bang"], OPTION_NOARG],

View File

@@ -126,7 +126,7 @@ liberator.AutoCommands = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.autocommand(filter) completer: function (filter) liberator.completion.autocommand(filter)
}); });

View File

@@ -268,7 +268,7 @@ liberator.IO = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.file(filter, true) completer: function (filter) liberator.completion.file(filter, true)
}); });
@@ -311,7 +311,7 @@ liberator.IO = function () //{{{
}, },
{ {
argCount: "+", argCount: "+",
bangAllowed: true bang: true
} }
); );
@@ -338,7 +338,7 @@ liberator.IO = function () //{{{
liberator.io.source(args, special); liberator.io.source(args, special);
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.file(filter, true) completer: function (filter) liberator.completion.file(filter, true)
}); });
@@ -362,7 +362,7 @@ liberator.IO = function () //{{{
liberator.autocommands.trigger("ShellCmdPost", ""); liberator.autocommands.trigger("ShellCmdPost", "");
}, },
{ bangAllowed: true }); { bang: true });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////

View File

@@ -184,7 +184,7 @@ const liberator = (function () //{{{
return [0, liberator.completion.filter(liberator.config.dialogs || [], filter)]; return [0, liberator.completion.filter(liberator.config.dialogs || [], filter)];
} }
}, },
{ bangAllowed: true }); { bang: true });
// TODO: move this // TODO: move this
function getMenuItems() function getMenuItems()
@@ -292,7 +292,7 @@ const liberator = (function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["h[elp]"], liberator.commands.add(["h[elp]"],
@@ -308,7 +308,7 @@ const liberator = (function () //{{{
liberator.help(args); liberator.help(args);
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) getHelpCompletions(filter) completer: function (filter) getHelpCompletions(filter)
}); });
@@ -336,7 +336,7 @@ const liberator = (function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.javascript(filter), completer: function (filter) liberator.completion.javascript(filter),
hereDoc: true, hereDoc: true,
}); });
@@ -346,7 +346,7 @@ const liberator = (function () //{{{
function (args, special) { liberator.events.feedkeys(args.string, special); }, function (args, special) { liberator.events.feedkeys(args.string, special); },
{ {
argCount: "+", argCount: "+",
bangAllowed: true bang: true
}); });
liberator.commands.add(["optionu[sage]"], liberator.commands.add(["optionu[sage]"],
@@ -374,7 +374,7 @@ const liberator = (function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["q[uit]"], liberator.commands.add(["q[uit]"],
@@ -388,7 +388,7 @@ const liberator = (function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["res[tart]"], liberator.commands.add(["res[tart]"],
@@ -481,7 +481,7 @@ const liberator = (function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) completer: function (filter)
{ {
if (/^:/.test(filter)) if (/^:/.test(filter))
@@ -504,7 +504,7 @@ const liberator = (function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["viu[sage]"], liberator.commands.add(["viu[sage]"],
@@ -532,7 +532,7 @@ const liberator = (function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
} }
@@ -700,7 +700,7 @@ const liberator = (function () //{{{
return; return;
} }
if (special && !command.bangAllowed) if (special && !command.bang)
{ {
liberator.echoerr("E477: No ! allowed"); liberator.echoerr("E477: No ! allowed");
return; return;

View File

@@ -729,7 +729,7 @@ liberator.Mail = function () //{{{
function (args, special) liberator.mail.getNewMessages(!special), function (args, special) liberator.mail.getNewMessages(!special),
{ {
argCount: "0", argCount: "0",
bangAllowed: true, bang: true,
}); });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}

View File

@@ -368,7 +368,7 @@ liberator.Options = function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true, bang: true,
}); });
liberator.commands.add(["setl[ocal]"], liberator.commands.add(["setl[ocal]"],
@@ -378,7 +378,7 @@ liberator.Options = function () //{{{
liberator.commands.get("set").execute(args, special, count, { scope: liberator.options.OPTION_SCOPE_LOCAL }); liberator.commands.get("set").execute(args, special, count, { scope: liberator.options.OPTION_SCOPE_LOCAL });
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter, special, count) completer: function (filter, special, count)
{ {
return liberator.commands.get("set").completer(filter, special, count, { scope: liberator.options.OPTION_SCOPE_LOCAL }); return liberator.commands.get("set").completer(filter, special, count, { scope: liberator.options.OPTION_SCOPE_LOCAL });
@@ -393,7 +393,7 @@ liberator.Options = function () //{{{
liberator.commands.get("set").execute(args, special, count, { scope: liberator.options.OPTION_SCOPE_GLOBAL }); liberator.commands.get("set").execute(args, special, count, { scope: liberator.options.OPTION_SCOPE_GLOBAL });
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter, special, count) completer: function (filter, special, count)
{ {
return liberator.commands.get("set").completer(filter, special, count, { scope: liberator.options.OPTION_SCOPE_GLOBAL }); return liberator.commands.get("set").completer(filter, special, count, { scope: liberator.options.OPTION_SCOPE_GLOBAL });
@@ -706,7 +706,7 @@ liberator.Options = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter, special, count, modifiers) completer: function (filter, special, count, modifiers)
{ {
var optionCompletions = []; var optionCompletions = [];
@@ -847,7 +847,7 @@ liberator.Options = function () //{{{
}, },
{ {
argCount: "+", argCount: "+",
bangAllowed: true bang: true
}); });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}

View File

@@ -344,7 +344,7 @@ liberator.Tabs = function () //{{{
liberator.tabs.remove(getBrowser().mCurrentTab, count > 0 ? count : 1, special, 0); liberator.tabs.remove(getBrowser().mCurrentTab, count > 0 ? count : 1, special, 0);
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.buffer(filter) completer: function (filter) liberator.completion.buffer(filter)
}); });
@@ -456,7 +456,7 @@ liberator.Tabs = function () //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.buffer(filter) completer: function (filter) liberator.completion.buffer(filter)
}); });
@@ -465,7 +465,7 @@ liberator.Tabs = function () //{{{
function (args, special) { liberator.tabs.list(special); }, function (args, special) { liberator.tabs.list(special); },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["quita[ll]", "qa[ll]"], liberator.commands.add(["quita[ll]", "qa[ll]"],
@@ -473,7 +473,7 @@ liberator.Tabs = function () //{{{
function (args, special) { liberator.quit(false, special); }, function (args, special) { liberator.quit(false, special); },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["reloada[ll]"], liberator.commands.add(["reloada[ll]"],
@@ -481,7 +481,7 @@ liberator.Tabs = function () //{{{
function (args, special) { liberator.tabs.reloadAll(special); }, function (args, special) { liberator.tabs.reloadAll(special); },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
// TODO: add count support // TODO: add count support
@@ -501,7 +501,7 @@ liberator.Tabs = function () //{{{
liberator.tabs.move(getBrowser().mCurrentTab, args, special); liberator.tabs.move(getBrowser().mCurrentTab, args, special);
}, },
{ bangAllowed: true }); { bang: true });
liberator.commands.add(["tabo[nly]"], liberator.commands.add(["tabo[nly]"],
"Close all other tabs", "Close all other tabs",
@@ -522,7 +522,7 @@ liberator.Tabs = function () //{{{
liberator.open("about:blank", where); liberator.open("about:blank", where);
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.url(filter) completer: function (filter) liberator.completion.url(filter)
}); });
@@ -531,7 +531,7 @@ liberator.Tabs = function () //{{{
function (args, special, count) { liberator.tabs.detachTab(null); }, function (args, special, count) { liberator.tabs.detachTab(null); },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["tabd[uplicate]"], liberator.commands.add(["tabd[uplicate]"],
@@ -552,7 +552,7 @@ liberator.Tabs = function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
} }
@@ -624,7 +624,7 @@ liberator.Tabs = function () //{{{
}, },
{ {
argCount: "0", argCount: "0",
bangAllowed: true bang: true
}); });
liberator.commands.add(["wqa[ll]", "wq", "xa[ll]"], liberator.commands.add(["wqa[ll]", "wq", "xa[ll]"],

View File

@@ -287,7 +287,7 @@ liberator.config = { //{{{
} }
}, },
{ {
bangAllowed: true, bang: true,
completer: function (filter) liberator.completion.url(filter) completer: function (filter) liberator.completion.url(filter)
}); });