diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-01-26 17:33:37 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-01-26 17:49:39 +0100 |
commit | c15c0d944da14b0d0de5456117b2da09b10c6256 (patch) | |
tree | 936c3df7b99acf6937e320c7a753908354e513ea | |
parent | 7576dc2719a65c72319d6e453372632e2729e907 (diff) | |
download | qutebrowser-c15c0d944da14b0d0de5456117b2da09b10c6256.tar.gz qutebrowser-c15c0d944da14b0d0de5456117b2da09b10c6256.zip |
Add :bookmark-list command
-rw-r--r-- | doc/changelog.asciidoc | 3 | ||||
-rw-r--r-- | doc/help/commands.asciidoc | 12 | ||||
-rw-r--r-- | qutebrowser/browser/commands.py | 12 |
3 files changed, 27 insertions, 0 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 45c32638d..e1cd9586e 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -118,6 +118,9 @@ Added - New `QUTE_VERSION` variable for userscripts, which can be used to read qutebrowser's version. - New "Copy URL" entry in the context menu for downloads. +- New `:bookmark-list` command which lists all bookmarks/quickmarks. The + corresponding `qute://bookmarks` URL already existed since v0.8.0, but it was + never exposed as a command. - New userscripts: * `kodi` to play videos in Kodi * `qr` to generate a QR code of the current URL diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index d03de6691..18ff44553 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -34,6 +34,7 @@ possible to run or bind multiple commands by separating them with `;;`. |<<bind,bind>>|Bind a key to a command. |<<bookmark-add,bookmark-add>>|Save the current page as a bookmark, or a specific url. |<<bookmark-del,bookmark-del>>|Delete a bookmark. +|<<bookmark-list,bookmark-list>>|Show all bookmarks/quickmarks. |<<bookmark-load,bookmark-load>>|Load a bookmark. |<<clear-keychain,clear-keychain>>|Clear the currently entered key chain. |<<clear-messages,clear-messages>>|Clear all message notifications. @@ -211,6 +212,17 @@ Delete a bookmark. ==== note * This command does not split arguments after the last argument and handles quotes literally. +[[bookmark-list]] +=== bookmark-list +Syntax: +:bookmark-list [*--tab*] [*--bg*] [*--window*]+ + +Show all bookmarks/quickmarks. + +==== optional arguments +* +*-t*+, +*--tab*+: Open in a new tab. +* +*-b*+, +*--bg*+: Open in a background tab. +* +*-w*+, +*--window*+: Open in a new window. + [[bookmark-load]] === bookmark-load Syntax: +:bookmark-load [*--tab*] [*--bg*] [*--window*] [*--delete*] 'url'+ diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 867cef9bc..62747d31c 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1283,6 +1283,18 @@ class CommandDispatcher: message.info("Removed bookmark {}".format(url)) @cmdutils.register(instance='command-dispatcher', scope='window') + def bookmark_list(self, tab=True, bg=False, window=False): + """Show all bookmarks/quickmarks. + + Args: + tab: Open in a new tab. + bg: Open in a background tab. + window: Open in a new window. + """ + url = QUrl('qute://bookmarks/') + self._open(url, tab, bg, window) + + @cmdutils.register(instance='command-dispatcher', scope='window') def download(self, url=None, *, mhtml_=False, dest=None): """Download a given URL, or current page if no URL given. |