diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 44c4ff39c..b757745a4 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -32,6 +32,7 @@ Added to cycle through inputs. - New `--no-last` flag for `:tab-focus` to not focus the last tab when focusing the currently focused one. +- New `--edit` flag for `:view-source` to open the source in an external editor. Changed ~~~~~~~ @@ -76,6 +77,8 @@ Removed - `QUTE_SELECTED_HTML` is now not set for userscripts anymore except when called via hints. +- The `qutebrowser_viewsource` userscript has been removed as `:view-source + --edit` can now be used. v1.1.1 ------ diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 97ce1a41f..bd84417d7 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -1326,8 +1326,13 @@ Show version information. [[view-source]] === view-source +Syntax: +:view-source [*--edit*]+ + Show the source of the current page in a new tab. +==== optional arguments +* +*-e*+, +*--edit*+: Edit the source in the editor instead of opening a tab. + [[window-only]] === window-only Close all windows except for the current one. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index a7f4e8c4d..a59cdac25 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1511,7 +1511,8 @@ class CommandDispatcher: """Show the source of the current page in a new tab. Args: - edit: Open source in editor instead of tab.""" + edit: Edit the source in the editor instead of opening a tab. + """ tab = self._current_widget() try: current_url = self._current_url()