diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index e3caf954e..54cf56042 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -215,11 +215,22 @@ The index of the download to delete. [[download-open]] === download-open +Syntax: +:download-open ['cmdline']+ + Open the last/[count]th download. +If no specific command is given, this will use the system's default application to open the file. + +==== positional arguments +* +'cmdline'+: The command which should be used to open the file. A `{}` is expanded to the temporary file name. + + ==== count The index of the download to open. +==== note +* This command does not split arguments after the last argument and handles quotes literally. + [[download-remove]] === download-remove Syntax: +:download-remove [*--all*]+ @@ -1172,10 +1183,14 @@ Syntax: +:prompt-open-download ['cmdline']+ Immediately open a download. -==== positional arguments -* +'cmdline'+: The command line string to execute. The default will use the system's application to open the file, depending on - the filetype. +If no specific command is given, this will use the system's default application to open the file. +==== positional arguments +* +'cmdline'+: The command which should be used to open the file. A `{}` is expanded to the temporary file name. + + +==== note +* This command does not split arguments after the last argument and handles quotes literally. [[prompt-yes]] === prompt-yes diff --git a/qutebrowser/browser/webkit/downloads.py b/qutebrowser/browser/webkit/downloads.py index 662a291c9..9a1f40d55 100644 --- a/qutebrowser/browser/webkit/downloads.py +++ b/qutebrowser/browser/webkit/downloads.py @@ -1058,9 +1058,12 @@ class DownloadManager(QAbstractListModel): def download_open(self, cmdline: str=None, count=0): """Open the last/[count]th download. + If no specific command is given, this will use the system's default + application to open the file. + Args: - cmdline: The command which should be used to open the file. A {} as - argument will be replaced by the download's filename. + cmdline: The command which should be used to open the file. A `{}` + is expanded to the temporary file name. count: The index of the download to open. """ try: diff --git a/qutebrowser/mainwindow/statusbar/prompter.py b/qutebrowser/mainwindow/statusbar/prompter.py index 0282f38cf..cbcb965af 100644 --- a/qutebrowser/mainwindow/statusbar/prompter.py +++ b/qutebrowser/mainwindow/statusbar/prompter.py @@ -316,11 +316,12 @@ class Prompter(QObject): def prompt_open_download(self, cmdline: str=None): """Immediately open a download. + If no specific command is given, this will use the system's default + application to open the file. + Args: - cmdline: The command line string to execute. The default will use - the system's application to open the file, depending on - the filetype. A `{}` is expanded to the temporary file - name. + cmdline: The command which should be used to open the file. A `{}` + is expanded to the temporary file name. """ if self._question.mode != usertypes.PromptMode.download: # We just ignore this if we don't have a download question.