diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 082997884..e73d6cf80 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -944,6 +944,7 @@ How many steps to zoom out. |============== |Command|Description |<>|Clear the currently entered key chain. +|<>|Click the element matching the given filter. |<>|Execute the command currently in the commandline. |<>|Go forward in the commandline history. |<>|Go back in the commandline history. @@ -1007,6 +1008,22 @@ How many steps to zoom out. === clear-keychain Clear the currently entered key chain. +[[click-element]] +=== click-element +Syntax: +:click-element [*--target* 'target'] 'filter' 'value'+ + +Click the element matching the given filter. + +The given filter needs to result in exactly one element, otherwise, an error is shown. + +==== positional arguments +* +'filter'+: How to filter the elements. id: Get an element based on its ID. + +* +'value'+: The value to filter for. + +==== optional arguments +* +*-t*+, +*--target*+: How to open the clicked element (normal/tab/tab-bg/window). + [[command-accept]] === command-accept Execute the command currently in the commandline. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 797e84ae7..14e0df85d 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1540,9 +1540,10 @@ class CommandDispatcher: error is shown. Args: - filter: How to filter the elements. - id: Get an element based on its ID. + filter_: How to filter the elements. + id: Get an element based on its ID. value: The value to filter for. + target: How to open the clicked element (normal/tab/tab-bg/window). """ tab = self._current_widget()