mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-14 13:15:45 +01:00
Add a ! bang version of :delbmarks to delete all bookmarks.
This commit is contained in:
@@ -387,13 +387,30 @@ function Bookmarks() //{{{
|
|||||||
"Delete a bookmark",
|
"Delete a bookmark",
|
||||||
function (args)
|
function (args)
|
||||||
{
|
{
|
||||||
let url = args.string || buffer.URL;
|
if (args.bang)
|
||||||
let deletedCount = bookmarks.remove(url);
|
{
|
||||||
|
commandline.input("This will delete all bookmarks. Would you like to continue? (yes/[no]) ",
|
||||||
|
function (resp)
|
||||||
|
{
|
||||||
|
if (resp && resp.match(/^y(es)?$/i))
|
||||||
|
{
|
||||||
|
bookmarks.get("").forEach(function (bmark) { bookmarks.remove(bmark.url); });
|
||||||
|
liberator.echomsg("All bookmarks deleted", 1, commandline.FORCE_SINGLELINE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
let url = args.string || buffer.URL;
|
||||||
|
let deletedCount = bookmarks.remove(url);
|
||||||
|
|
||||||
|
liberator.echomsg(deletedCount + " bookmark(s) with url `" + url + "' deleted", 1, commandline.FORCE_SINGLELINE);
|
||||||
|
}
|
||||||
|
|
||||||
liberator.echomsg(deletedCount + " bookmark(s) with url `" + url + "' deleted", 1, commandline.FORCE_SINGLELINE);
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
argCount: "?",
|
argCount: "?",
|
||||||
|
bang: true,
|
||||||
completer: function completer(context) completion.bookmark(context),
|
completer: function completer(context) completion.bookmark(context),
|
||||||
literal: 0
|
literal: 0
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
(this might change again, as this is REALLY inconsistent, and i don't
|
(this might change again, as this is REALLY inconsistent, and i don't
|
||||||
know if I like copying bugs)
|
know if I like copying bugs)
|
||||||
|
|
||||||
|
* add ! version of :delbmarks to delete all bookmarks.
|
||||||
* new "t" option for 'complete' to also switch to open tabs with :open
|
* new "t" option for 'complete' to also switch to open tabs with :open
|
||||||
* add [c]:toolbaropen[c], [c]:toolbarclose[c], and [c]:toolbartoggle[c]
|
* add [c]:toolbaropen[c], [c]:toolbarclose[c], and [c]:toolbartoggle[c]
|
||||||
* make [c]:open[c] behavior match that of [c]:tabopen[c] and [c]:winopen[c]
|
* make [c]:open[c] behavior match that of [c]:tabopen[c] and [c]:winopen[c]
|
||||||
|
|||||||
@@ -62,14 +62,13 @@ ________________________________________________________________________________
|
|||||||
|
|
||||||
|:delbm| |:delbmarks|
|
|:delbm| |:delbmarks|
|
||||||
||:delbm[arks] [a][url][a]|| +
|
||:delbm[arks] [a][url][a]|| +
|
||||||
|
||:delbm[arks]!||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Delete a bookmark. Deletes *all* bookmarks which match the [a][url][a]. If
|
Delete a bookmark. Deletes *all* bookmarks which match the [a][url][a]. If
|
||||||
omitted, [a][url][a] defaults to the URL of the current buffer. Use [m]<Tab>[m]
|
omitted, [a][url][a] defaults to the URL of the current buffer. Use [m]<Tab>[m]
|
||||||
key on a string to complete the URL which you want to delete.
|
key on a string to complete the URL which you want to delete.
|
||||||
|
|
||||||
The following options WILL be interpreted in the future:
|
If ! is specified then all bookmarks will be deleted.
|
||||||
|
|
||||||
* [!] a special version to delete ALL bookmarks
|
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
section::History[history]
|
section::History[history]
|
||||||
|
|||||||
@@ -62,14 +62,13 @@ ________________________________________________________________________________
|
|||||||
|
|
||||||
|:delbm| |:delbmarks|
|
|:delbm| |:delbmarks|
|
||||||
||:delbm[arks] [a][url][a]|| +
|
||:delbm[arks] [a][url][a]|| +
|
||||||
|
||:delbm[arks]!||
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
Delete a bookmark. Deletes *all* bookmarks which match the [a][url][a]. If
|
Delete a bookmark. Deletes *all* bookmarks which match the [a][url][a]. If
|
||||||
omitted, [a][url][a] defaults to the URL of the current buffer. Use [m]<Tab>[m]
|
omitted, [a][url][a] defaults to the URL of the current buffer. Use [m]<Tab>[m]
|
||||||
key on a string to complete the URL which you want to delete.
|
key on a string to complete the URL which you want to delete.
|
||||||
|
|
||||||
The following options WILL be interpreted in the future:
|
If ! is specified then all bookmarks will be deleted.
|
||||||
|
|
||||||
* [!] a special version to delete ALL bookmarks
|
|
||||||
________________________________________________________________________________
|
________________________________________________________________________________
|
||||||
|
|
||||||
section::History[history]
|
section::History[history]
|
||||||
|
|||||||
Reference in New Issue
Block a user