diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index e3ced7cfb..47edfc22c 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ Changed already exists. - `:bookmark-load` now has a `--delete` flag which deletes the bookmark after loading it. +- `:open` now also accepts quickmark names instead of URLs Fixed ----- diff --git a/README.asciidoc b/README.asciidoc index e1b2a8cbc..b9d46450a 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -207,6 +207,7 @@ Contributors, sorted by the number of commits in descending order: * Ismail * Edgar Hipp * Daryl Finlay +* Claire Cavanaugh * adam * Samir Benmendil * Regina Hug diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 3e5581ff3..31ed521c2 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -249,12 +249,15 @@ class CommandDispatcher: "set!") else: try: - url = urlutils.fuzzy_url(url) - except urlutils.InvalidUrlError as e: - # We don't use cmdexc.CommandError here as this can be called - # async from edit_url - message.error(self._win_id, str(e)) - return + url = objreg.get('quickmark-manager').get(url) + except urlmarks.Error: + try: + url = urlutils.fuzzy_url(url) + except urlutils.InvalidUrlError as e: + # We don't use cmdexc.CommandError here as this can be + # called async from edit_url + message.error(self._win_id, str(e)) + return if tab or bg or window: self._open(url, tab, bg, window) else: diff --git a/tests/end2end/features/open.feature b/tests/end2end/features/open.feature index 13f1c7cc2..4264ccb9c 100644 --- a/tests/end2end/features/open.feature +++ b/tests/end2end/features/open.feature @@ -103,3 +103,8 @@ Feature: Opening pages history: - active: true url: http://localhost:*/data/numbers/7.txt + + Scenario: Opening a quickmark + When I run :quickmark-add http://localhost:(port)/data/numbers/8.txt quickmarktest + And I run :open quickmarktest + Then data/numbers/8.txt should be loaded