From 615be2a4bc217410edee1330006d4f0daa7b81c7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 20 Nov 2014 06:25:01 +0100 Subject: [PATCH] Update docs. --- doc/help/commands.asciidoc | 11 +++++++++++ qutebrowser/browser/downloads.py | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index c1fe9ef9e..ded0fc739 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -9,6 +9,7 @@ |<>|Bind a key to a command. |<>|Cancel the first/[count]th download. |<>|Close the current window. +|<>|Download a given URL, given as string. |<>|Download the current page. |<>|Go forward in the history of the current tab. |<>|Show help about a command or setting. @@ -88,6 +89,16 @@ The index of the download to cancel. === close Close the current window. +[[download]] +=== download +Syntax: +:download 'url' ['dest']+ + +Download a given URL, given as string. + +==== positional arguments +* +'url'+: The URL to download +* +'dest'+: The file path to write the download to to ask. + [[download-page]] === download-page Download the current page. diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 7f529d5e2..0c1593591 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -390,7 +390,12 @@ class DownloadManager(QAbstractListModel): @cmdutils.register(instance='download-manager', scope='window') def download(self, url, dest=None): - """Download a given URL, given as string.""" + """Download a given URL, given as string. + + Args: + url: The URL to download + dest: The file path to write the download to, or None to ask. + """ url = urlutils.qurl_from_user_input(url) urlutils.raise_cmdexc_if_invalid(url) self.get(url, filename=dest)