diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index b2f85d905..88c738729 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -36,13 +36,13 @@ It is possible to run or bind multiple commands by separating them with `;;`. |<>|Clear all message notifications. |<>|Click the element matching the given filter. |<>|Close the current window. -|<>|Add a key/value pair to a dictionary option. -|<>|Append a value to a config option that is a list. |<>|Set all settings back to their default. |<>|Cycle an option between multiple values. +|<>|Add a key/value pair to a dictionary option. +|<>|Remove a key from a dict. |<>|Open the config.py file in the editor. -|<>|Remove a key from a dict. -|<>|Remove a value from a list. +|<>|Append a value to a config option that is a list. +|<>|Remove a value from a list. |<>|Read a config.py file. |<>|Unset an option. |<>|Write the current configuration to a config.py file. @@ -270,35 +270,6 @@ The given filter needs to result in exactly one element, otherwise, an error is === close Close the current window. -[[config-add-dict]] -=== config-add-dict -Syntax: +:config-add-dict [*--temp*] [*--replace*] 'option' 'key' 'value'+ - -Add a key/value pair to a dictionary option. - -==== positional arguments -* +'option'+: The name of the option. -* +'key'+: The key to use. -* +'value'+: The value to place in the dictionary. - -==== optional arguments -* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed. -* +*-r*+, +*--replace*+: Replace existing values. By default, existing values are not overwritten. - - -[[config-add-list]] -=== config-add-list -Syntax: +:config-add-list [*--temp*] 'option' 'value'+ - -Append a value to a config option that is a list. - -==== positional arguments -* +'option'+: The name of the option. -* +'value'+: The value to append to the end of the list. - -==== optional arguments -* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed. - [[config-clear]] === config-clear Syntax: +:config-clear [*--save*]+ @@ -325,18 +296,25 @@ Cycle an option between multiple values. * +*-t*+, +*--temp*+: Set value temporarily until qutebrowser is closed. * +*-p*+, +*--print*+: Print the value after setting. -[[config-edit]] -=== config-edit -Syntax: +:config-edit [*--no-source*]+ +[[config-dict-add]] +=== config-dict-add +Syntax: +:config-dict-add [*--temp*] [*--replace*] 'option' 'key' 'value'+ -Open the config.py file in the editor. +Add a key/value pair to a dictionary option. + +==== positional arguments +* +'option'+: The name of the option. +* +'key'+: The key to use. +* +'value'+: The value to place in the dictionary. ==== optional arguments -* +*-n*+, +*--no-source*+: Don't re-source the config file after editing. +* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed. +* +*-r*+, +*--replace*+: Replace existing values. By default, existing values are not overwritten. -[[config-remove-dict]] -=== config-remove-dict -Syntax: +:config-remove-dict [*--temp*] 'option' 'key'+ + +[[config-dict-remove]] +=== config-dict-remove +Syntax: +:config-dict-remove [*--temp*] 'option' 'key'+ Remove a key from a dict. @@ -347,9 +325,31 @@ Remove a key from a dict. ==== optional arguments * +*-t*+, +*--temp*+: Remove value temporarily until qutebrowser is closed. -[[config-remove-list]] -=== config-remove-list -Syntax: +:config-remove-list [*--temp*] 'option' 'value'+ +[[config-edit]] +=== config-edit +Syntax: +:config-edit [*--no-source*]+ + +Open the config.py file in the editor. + +==== optional arguments +* +*-n*+, +*--no-source*+: Don't re-source the config file after editing. + +[[config-list-add]] +=== config-list-add +Syntax: +:config-list-add [*--temp*] 'option' 'value'+ + +Append a value to a config option that is a list. + +==== positional arguments +* +'option'+: The name of the option. +* +'value'+: The value to append to the end of the list. + +==== optional arguments +* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed. + +[[config-list-remove]] +=== config-list-remove +Syntax: +:config-list-remove [*--temp*] 'option' 'value'+ Remove a value from a list. diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index b93155255..0c95f5657 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -754,7 +754,6 @@ class HintManager(QObject): self._context.tab.elements.find_css(selector, self._start_cb, only_visible=True) - def _get_hint_mode(self, mode): """Get the hinting mode to use based on a mode argument.""" if mode is None: diff --git a/qutebrowser/completion/models/configmodel.py b/qutebrowser/completion/models/configmodel.py index 722a7d33e..19b252242 100644 --- a/qutebrowser/completion/models/configmodel.py +++ b/qutebrowser/completion/models/configmodel.py @@ -44,15 +44,15 @@ def customized_option(*, info): def list_option(*, info): """A CompletionModel filled with settings whose values are lists.""" - predicate = lambda opt: (isinstance(info.config.get_obj(opt.name), list) - and not opt.no_autoconfig) + predicate = lambda opt: (isinstance(info.config.get_obj(opt.name), + list) and not opt.no_autoconfig) return _option(info, "List options", predicate) def dict_option(*, info): """A CompletionModel filled with settings whose values are dicts.""" - predicate = lambda opt: (isinstance(info.config.get_obj(opt.name), dict) - and not opt.no_autoconfig) + predicate = lambda opt: (isinstance(info.config.get_obj(opt.name), + dict) and not opt.no_autoconfig) return _option(info, "Dict options", predicate)