From 85008e2c497bc87c2ec99e968b1d28c1af226666 Mon Sep 17 00:00:00 2001 From: crazy hugsy Date: Sun, 2 Jun 2024 12:44:13 -0700 Subject: [PATCH] restore completion for subcommands --- gef.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gef.py b/gef.py index 11a466fd4..b8d310c33 100644 --- a/gef.py +++ b/gef.py @@ -4646,10 +4646,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self.repeat = False self.repeat_count = 0 self.__last_command = None - command_type = kwargs.setdefault("command", gdb.COMMAND_OBSCURE) - complete_type = kwargs.setdefault("complete", gdb.COMPLETE_NONE) + command_type = kwargs.setdefault("command", gdb.COMMAND_USER) + complete_type = kwargs.setdefault("complete", -1) # -1=allow user-defined `complete()` prefix = kwargs.setdefault("prefix", False) - super().__init__(self._cmdline_, command_type, complete_type, prefix) + super().__init__(name=self._cmdline_, command_class=command_type, + completer_class=complete_type, prefix=prefix) self.post_load() return