From 2ebb57fe935ae397b5f4d07fc59eb49e462971bd Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 4 Oct 2008 16:48:32 +0000 Subject: [PATCH] rename Command's bangAllowed property to bang --- content/addressbook.js | 2 +- content/bookmarks.js | 10 +++++----- content/buffer.js | 12 ++++++------ content/commands.js | 6 +++--- content/events.js | 2 +- content/io.js | 8 ++++---- content/liberator.js | 22 +++++++++++----------- content/mail.js | 2 +- content/options.js | 10 +++++----- content/tabs.js | 20 ++++++++++---------- content/vimperator.js | 2 +- 11 files changed, 48 insertions(+), 48 deletions(-) diff --git a/content/addressbook.js b/content/addressbook.js index 54f8d429..3813efac 100644 --- a/content/addressbook.js +++ b/content/addressbook.js @@ -138,7 +138,7 @@ liberator.Addressbook = function () //{{{ liberator.commands.add(["contacts", "addr[essbook]"], "List or open multiple addresses", function (args, special) { liberator.addressbook.list(args, special); }, - { bangAllowed: true }); + { bang: true }); /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// PUBLIC SECTION ////////////////////////////////////////// diff --git a/content/bookmarks.js b/content/bookmarks.js index f956c169..f30cd366 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -275,7 +275,7 @@ liberator.Bookmarks = function () //{{{ liberator.bookmarks.list(args.arguments.join(" "), args["-tags"] || [], special); }, { - bangAllowed: true, + bang: true, completer: function (filter) [0, liberator.bookmarks.get(filter)], options: [[["-tags", "-T"], liberator.commands.OPTION_LIST]] }); @@ -602,7 +602,7 @@ liberator.History = function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) { var sh = getWebNavigation().sessionHistory; @@ -649,7 +649,7 @@ liberator.History = function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) { var sh = getWebNavigation().sessionHistory; @@ -670,7 +670,7 @@ liberator.History = function () //{{{ "Show recently visited URLs", function (args, special) { liberator.history.list(args, special); }, { - bangAllowed: true, + bang: true, completer: function (filter) [0, liberator.history.get(filter)] }); @@ -853,7 +853,7 @@ liberator.QuickMarks = function () //{{{ else liberator.quickmarks.remove(args); }, - { bangAllowed: true }); + { bang: true }); liberator.commands.add(["qma[rk]"], "Mark a URL with a letter for quick access", diff --git a/content/buffer.js b/content/buffer.js index 43e9b7e3..0314dc6e 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -607,7 +607,7 @@ liberator.Buffer = function () //{{{ liberator.options.setPref("print.show_print_progress", spp); liberator.echo("Print job sent."); }, - { bangAllowed: true }); + { bang: true }); liberator.commands.add(["pa[geinfo]"], "Show various page information", @@ -637,7 +637,7 @@ liberator.Buffer = function () //{{{ "Reload current page", function (args, special) { liberator.tabs.reload(getBrowser().mCurrentTab, special); }, { - bangAllowed: true, + bang: true, argCount: "0" }); @@ -656,7 +656,7 @@ liberator.Buffer = function () //{{{ //else saveDocument(window.content.document, special); }, - { bangAllowed: true, }); + { bang: true, }); liberator.commands.add(["st[op]"], "Stop loading", @@ -704,7 +704,7 @@ liberator.Buffer = function () //{{{ liberator.commands.add(["vie[wsource]"], "View source code of current document", function (args, special) { liberator.buffer.viewSource(args, special); }, - { bangAllowed: true }); + { bang: true }); liberator.commands.add(["zo[om]"], "Set zoom value of current web page", @@ -744,7 +744,7 @@ liberator.Buffer = function () //{{{ else liberator.buffer.textZoom = level; }, - { bangAllowed: true }); + { bang: true }); /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// PAGE INFO /////////////////////////////////////////////// @@ -1660,7 +1660,7 @@ liberator.Marks = function () //{{{ liberator.marks.remove(args, special); }, - { bangAllowed: true }); + { bang: true }); liberator.commands.add(["ma[rk]"], "Mark current location within the web page", diff --git a/content/commands.js b/content/commands.js index a27708d4..1080f038 100644 --- a/content/commands.js +++ b/content/commands.js @@ -78,7 +78,7 @@ liberator.Command = function (specs, description, action, extraInfo) //{{{ this.completer = extraInfo.completer || null; this.hereDoc = extraInfo.hereDoc || false; this.options = extraInfo.options || []; - this.bangAllowed = extraInfo.bangAllowed || false; + this.bang = extraInfo.bang || false; this.isUserCommand = extraInfo.isUserCommand || false; this.replacementText = extraInfo.replacementText || null; @@ -701,7 +701,7 @@ liberator.Commands = function () //{{{ liberator.execute(replaced); }, { - bangAllowed: true, // FIXME: until we implement -bang + bang: true, // FIXME: until we implement -bang replacementText: rep }, special) @@ -729,7 +729,7 @@ liberator.Commands = function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.userCommand(filter) /*options: [[["-nargs"], OPTION_STRING, function (arg) { return /^(0|1|\*|\?|\+)$/.test(arg); }], [["-bang"], OPTION_NOARG], diff --git a/content/events.js b/content/events.js index cd9682db..b946b043 100644 --- a/content/events.js +++ b/content/events.js @@ -126,7 +126,7 @@ liberator.AutoCommands = function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.autocommand(filter) }); diff --git a/content/io.js b/content/io.js index d1976a80..f2ee9fe5 100644 --- a/content/io.js +++ b/content/io.js @@ -268,7 +268,7 @@ liberator.IO = function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.file(filter, true) }); @@ -311,7 +311,7 @@ liberator.IO = function () //{{{ }, { argCount: "+", - bangAllowed: true + bang: true } ); @@ -338,7 +338,7 @@ liberator.IO = function () //{{{ liberator.io.source(args, special); }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.file(filter, true) }); @@ -362,7 +362,7 @@ liberator.IO = function () //{{{ liberator.autocommands.trigger("ShellCmdPost", ""); }, - { bangAllowed: true }); + { bang: true }); /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// PUBLIC SECTION ////////////////////////////////////////// diff --git a/content/liberator.js b/content/liberator.js index c6fe3d06..2a2f7cdc 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -184,7 +184,7 @@ const liberator = (function () //{{{ return [0, liberator.completion.filter(liberator.config.dialogs || [], filter)]; } }, - { bangAllowed: true }); + { bang: true }); // TODO: move this function getMenuItems() @@ -292,7 +292,7 @@ const liberator = (function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["h[elp]"], @@ -308,7 +308,7 @@ const liberator = (function () //{{{ liberator.help(args); }, { - bangAllowed: true, + bang: true, completer: function (filter) getHelpCompletions(filter) }); @@ -336,7 +336,7 @@ const liberator = (function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.javascript(filter), hereDoc: true, }); @@ -346,7 +346,7 @@ const liberator = (function () //{{{ function (args, special) { liberator.events.feedkeys(args.string, special); }, { argCount: "+", - bangAllowed: true + bang: true }); liberator.commands.add(["optionu[sage]"], @@ -374,7 +374,7 @@ const liberator = (function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["q[uit]"], @@ -388,7 +388,7 @@ const liberator = (function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["res[tart]"], @@ -481,7 +481,7 @@ const liberator = (function () //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) { if (/^:/.test(filter)) @@ -504,7 +504,7 @@ const liberator = (function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["viu[sage]"], @@ -532,7 +532,7 @@ const liberator = (function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); } @@ -700,7 +700,7 @@ const liberator = (function () //{{{ return; } - if (special && !command.bangAllowed) + if (special && !command.bang) { liberator.echoerr("E477: No ! allowed"); return; diff --git a/content/mail.js b/content/mail.js index e85a1f13..d02bd8d0 100644 --- a/content/mail.js +++ b/content/mail.js @@ -729,7 +729,7 @@ liberator.Mail = function () //{{{ function (args, special) liberator.mail.getNewMessages(!special), { argCount: "0", - bangAllowed: true, + bang: true, }); /////////////////////////////////////////////////////////////////////////////}}} diff --git a/content/options.js b/content/options.js index a4e63691..3f406283 100644 --- a/content/options.js +++ b/content/options.js @@ -368,7 +368,7 @@ liberator.Options = function () //{{{ }, { argCount: "0", - bangAllowed: true, + bang: true, }); 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 }); }, { - bangAllowed: true, + bang: true, completer: function (filter, special, count) { 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 }); }, { - bangAllowed: true, + bang: true, completer: function (filter, special, count) { 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) { var optionCompletions = []; @@ -847,7 +847,7 @@ liberator.Options = function () //{{{ }, { argCount: "+", - bangAllowed: true + bang: true }); /////////////////////////////////////////////////////////////////////////////}}} diff --git a/content/tabs.js b/content/tabs.js index 3c1ee398..89a83e57 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -344,7 +344,7 @@ liberator.Tabs = function () //{{{ liberator.tabs.remove(getBrowser().mCurrentTab, count > 0 ? count : 1, special, 0); }, { - bangAllowed: true, + bang: true, 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) }); @@ -465,7 +465,7 @@ liberator.Tabs = function () //{{{ function (args, special) { liberator.tabs.list(special); }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["quita[ll]", "qa[ll]"], @@ -473,7 +473,7 @@ liberator.Tabs = function () //{{{ function (args, special) { liberator.quit(false, special); }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["reloada[ll]"], @@ -481,7 +481,7 @@ liberator.Tabs = function () //{{{ function (args, special) { liberator.tabs.reloadAll(special); }, { argCount: "0", - bangAllowed: true + bang: true }); // TODO: add count support @@ -501,7 +501,7 @@ liberator.Tabs = function () //{{{ liberator.tabs.move(getBrowser().mCurrentTab, args, special); }, - { bangAllowed: true }); + { bang: true }); liberator.commands.add(["tabo[nly]"], "Close all other tabs", @@ -522,7 +522,7 @@ liberator.Tabs = function () //{{{ liberator.open("about:blank", where); }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.url(filter) }); @@ -531,7 +531,7 @@ liberator.Tabs = function () //{{{ function (args, special, count) { liberator.tabs.detachTab(null); }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["tabd[uplicate]"], @@ -552,7 +552,7 @@ liberator.Tabs = function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); } @@ -624,7 +624,7 @@ liberator.Tabs = function () //{{{ }, { argCount: "0", - bangAllowed: true + bang: true }); liberator.commands.add(["wqa[ll]", "wq", "xa[ll]"], diff --git a/content/vimperator.js b/content/vimperator.js index 8977e2f7..b0439e30 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -287,7 +287,7 @@ liberator.config = { //{{{ } }, { - bangAllowed: true, + bang: true, completer: function (filter) liberator.completion.url(filter) });