From 6e3d5867f907478a42e3ed7ebfb826fe125d6e6f Mon Sep 17 00:00:00 2001 From: Joel Torstensson Date: Mon, 9 Feb 2015 17:38:50 +0100 Subject: [PATCH] Fixed docs. --- README.asciidoc | 2 +- doc/help/commands.asciidoc | 48 +++++++++++++++++++++----------- qutebrowser/browser/commands.py | 2 +- qutebrowser/browser/downloads.py | 2 +- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 52b36cec8..b679d29a8 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -131,11 +131,11 @@ Contributors, sorted by the number of commits in descending order: * Florian Bruhin * Claude * ZDarian +* Joel Torstensson * Peter Vilim * John ShaggyTwoDope Jenkins * rikn00 * Martin Zimmermann -* Joel Torstensson * Error 800 * Brian Jackson * Patric Schmitz diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 51847b09b..8fd0b7608 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -8,10 +8,11 @@ |<>|Update the adblock block lists. |<>|Go back in the history of the current tab. |<>|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. +|<>|Download a given URL, or current page if no URL given. +|<>|Cancel the last/[count]th download. +|<>|Open the last/[count]th finished download. +|<>|Remove the last/[count]th finished download. |<>|Go forward in the history of the current tab. |<>|Toggle fullscreen mode. |<>|Show help about a command or setting. @@ -85,30 +86,45 @@ Bind a key to a command. * +*-m*+, +*--mode*+: A comma-separated list of modes to bind the key in (default: `normal`). -[[cancel-download]] -=== cancel-download -Cancel the first/[count]th download. - -==== count -The index of the download to cancel. - [[close]] === close Close the current window. [[download]] === download -Syntax: +:download 'url' ['dest']+ +Syntax: +:download ['url'] ['dest']+ -Download a given URL, given as string. +Download a given URL, or current page if no URL given. ==== positional arguments -* +'url'+: The URL to download +* +'url'+: The URL to download. If not given, download the current page. * +'dest'+: The file path to write the download to to ask. -[[download-page]] -=== download-page -Download the current page. +[[download-cancel]] +=== download-cancel +Cancel the last/[count]th download. + +==== count +The index of the download to cancel. + +[[download-open]] +=== download-open +Open the last/[count]th finished download. + +==== count +The index of the download to cancel. + +[[download-remove]] +=== download-remove +Syntax: +:download-remove [*--all*]+ + +Remove the last/[count]th finished download. + +==== optional arguments +* +*-a*+, +*--all*+: If given removes all finished downloads. + +==== count +The index of the download to cancel. [[forward]] === forward diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 4062102fc..717c523b2 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -915,7 +915,7 @@ class CommandDispatcher: """Download a given URL, or current page if no URL given. Args: - url: The URL to download, or None to download current page. + url: The URL to download. If not given, download the current page. dest: The file path to write the download to, or None to ask. """ download_manager = objreg.get('download-manager', scope='window', diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 25fe19503..6119aee7f 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -833,7 +833,7 @@ class DownloadManager(QAbstractListModel): """Remove the last/[count]th finished download. Args: - all: Whether to remove all finished downloads. + all_: If given removes all finished downloads. count: The index of the download to cancel. """ finished_items = [d for d in self.downloads if d.done]