diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 2fe38c4d3..354ef90e4 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -99,7 +99,7 @@ Download a given URL, or current page if no URL given. ==== positional arguments * +'url'+: The URL to download. If not given, download the current page. -* +'dest'+: The file path to write the download to to ask. +* +'dest'+: The file path to write the download to, or not given to ask. [[download-cancel]] === download-cancel diff --git a/qutebrowser/utils/docutils.py b/qutebrowser/utils/docutils.py index 1d9269fd1..ae088ffa8 100644 --- a/qutebrowser/utils/docutils.py +++ b/qutebrowser/utils/docutils.py @@ -102,7 +102,10 @@ class DocstringParser: if stop: break for k, v in self.arg_descs.items(): - self.arg_descs[k] = ' '.join(v).replace(', or None', '') + desc = ' '.join(v) + desc = re.sub(r', or None($|\.)', r'\1', desc) + desc = re.sub(r', or None', r', or not given', desc) + self.arg_descs[k] = desc self.long_desc = ' '.join(self.long_desc) self.short_desc = ' '.join(self.short_desc)