diff --git a/qutebrowser/completion/models/miscmodels.py b/qutebrowser/completion/models/miscmodels.py index bbbaa8a9d..56d436079 100644 --- a/qutebrowser/completion/models/miscmodels.py +++ b/qutebrowser/completion/models/miscmodels.py @@ -75,8 +75,8 @@ class HelpCompletionModel(base.BaseCompletionModel): assert cmdutils.cmd_dict cmdlist = [] for obj in set(cmdutils.cmd_dict.values()): - if (obj.hide or (obj.debug and not objreg.get('args').debug) or - obj.deprecated): + if ((obj.debug and not objreg.get('args').debug) or + obj.deprecated): pass else: cmdlist.append((':' + obj.name, obj.desc)) diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py index 6772e1201..3f85c0eff 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -193,7 +193,7 @@ def test_help_completion(qtmodeltester, monkeypatch, stubs): """Test the results of command completion. Validates that: - - only non-hidden and non-deprecated commands are included + - only non-deprecated commands are included - commands are sorted by name - the command description is shown in the desc column - the binding (if any) is shown in the misc column @@ -211,8 +211,9 @@ def test_help_completion(qtmodeltester, monkeypatch, stubs): assert actual == [ ("Commands", [ (':drop', 'drop all user data', ''), + (':hide', '', ''), (':roll', 'never gonna give you up', ''), - (':stop', 'stop qutebrowser', '') + (':stop', 'stop qutebrowser', ''), ]), ("Settings", [ ('general->time', 'Is an illusion.', ''),