Show hidden commands in help completion.
Hidden commands are not shown in command completion as they typically would not be run directly. However, a user might still might like to see help for them if, for example, they are writing a script or creating a binding. Addresses #1707.
This commit is contained in:
parent
81eb53a152
commit
dd9470af94
@ -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))
|
||||
|
@ -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.', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user