From 480cf787b200c5d6f0e00f2e5d71fc2b994aafb3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 28 Jan 2014 06:22:09 +0100 Subject: [PATCH] Hide internal commands --- qutebrowser/commands/__init__.py | 3 +++ qutebrowser/commands/utils.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qutebrowser/commands/__init__.py b/qutebrowser/commands/__init__.py index 616603de5..88071be51 100644 --- a/qutebrowser/commands/__init__.py +++ b/qutebrowser/commands/__init__.py @@ -55,6 +55,7 @@ class Print(Command): class Scroll(Command): nargs = 2 count = True + hide = True class Undo(Command): nargs = 0 @@ -62,10 +63,12 @@ class Undo(Command): class ScrollPercentX(Command): nargs = '?' count = True + hide = True class ScrollPercentY(Command): nargs = '?' count = True + hide = True class PyEval(Command): nargs = 1 diff --git a/qutebrowser/commands/utils.py b/qutebrowser/commands/utils.py index cb711f328..87c927f74 100644 --- a/qutebrowser/commands/utils.py +++ b/qutebrowser/commands/utils.py @@ -89,7 +89,8 @@ class CommandCompletionModel(CompletionModel): assert(cmd_dict) cmdlist = [] for obj in set(cmd_dict.values()): - cmdlist.append([obj.mainname, obj.desc]) + if not obj.hide: + cmdlist.append([obj.mainname, obj.desc]) self._data['Commands'] = sorted(cmdlist) self.init_data() @@ -109,6 +110,7 @@ class Command(QObject): count = False split_args = True signal = pyqtSignal(tuple) + hide = False desc = "" # FIXME add descriptions everywhere def __init__(self):