diff --git a/NEWS b/NEWS index c8a4780a..559378da 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ * new ;b extended hint mode (thanks Daniel Schaffrath) * :qa! and :q! quit forcefully, as in vim * stop macro playback on + * :bmark now updates a bookmark, if possible. :bmark! adds a new one * many bug fixes 2008-08-16: diff --git a/content/bookmarks.js b/content/bookmarks.js index 8df32808..b4bf48a4 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -261,6 +261,7 @@ liberator.Bookmarks = function () //{{{ }, { argCount: "?", + bang: true, options: [[["-title", "-t"], liberator.commands.OPTION_STRING], [["-tags", "-T"], liberator.commands.OPTION_LIST], [["-keyword", "-k"], liberator.commands.OPTION_STRING, function (arg) /\w/.test(arg)]] diff --git a/content/buffer.js b/content/buffer.js index 9c155b54..25c5d199 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -115,10 +115,10 @@ liberator.Buffer = function () //{{{ { if (filter[0] == "*") return "@namespace url(" + XHTML + ");\n" + css; - let selectors = filter.map(function (part) (/\/$/.test(part) ? "url-prefix" : - /\/:/.test(part) ? "url" - : "domain") - + '("' + part.replace(/"/g, "%22") + '")') + let selectors = filter.map(function (part) (/[*]$/.test(part) ? "url-prefix" : + /[\/:]/.test(part) ? "url" + : "domain") + + '("' + part.replace(/"/g, "%22").replace(/[*]$/, "") + '")') .join(", "); return "@namespace url(" + XHTML + ");\n" + "@-moz-document " + selectors + "{\n" + css + "\n}\n"; diff --git a/locale/en-US/marks.txt b/locale/en-US/marks.txt index 84613da5..ce8fabd9 100644 --- a/locale/en-US/marks.txt +++ b/locale/en-US/marks.txt @@ -15,7 +15,7 @@ Vimperator supports a number of different marks: section:Bookmarks[bookmarks] |a| |:bma| |:bmark| -||:bma[rk] [-title=title] [-keyword=kw] [-tags=tag1,tag2] [url]|| + +||:bma[rk][!] [-title=title] [-keyword=kw] [-tags=tag1,tag2] [url]|| + ||a|| ____________________________________________________________________________ Add a bookmark. + @@ -26,8 +26,10 @@ The following options are interpreted: - -tags=comma,separated,tag,list (short option: -T) - -keyword=keyword (short option: -k) -If you don't add a custom title, either the title of the web page or the URL -is taken as the title. You can omit the optional [url] argument, so just do +If [!] is present, a new bookmark is always added. Otherwise, the first +bookmark matching [url] is updated. +When creating a new bookmark, if [-title] isn't given, either the web page's +title or url is used. You can omit the optional [url] argument, so just do [c]:bmark[c] to bookmark the currently loaded web page with a default title and without any tags. ____________________________________________________________________________