stream: add group completer for input command
@@ -58,6 +58,7 @@ def get_completer_mapping():
key_completer = LatestUsedFirstWordCompleter(config.completer_max, [])
member_completer = LatestUsedFirstWordCompleter(config.completer_max, [])
field_completer = LatestUsedFirstWordCompleter(config.completer_max, [])
+ group_completer = LatestUsedFirstWordCompleter(config.completer_max, [])
completer_mapping.update(
{
@@ -72,6 +73,8 @@ def get_completer_mapping():
# hash fields
"field": field_completer,
"fields": field_completer,
+ # stream groups
+ "group": group_completer,
}
)
# patch command completer with hint
@@ -110,6 +113,10 @@ class IRedisCompleter(Completer):
def field_completer(self) -> LatestUsedFirstWordCompleter:
return self.completer_mapping["field"]
+ @property
+ def group_completer(self) -> LatestUsedFirstWordCompleter:
+ return self.completer_mapping["group"]
+
def get_completer(self, input_text):
try:
command, _ = split_command_args(input_text, all_commands)
