titus.inspector.defs.CommandGroup

class titus.inspector.defs.CommandGroup(name, commands)[source]

Bases: titus.inspector.defs.Command

A pfainspector command that defers to a group of subcommands.

__init__(name, commands)
Parameters:
  • name (string) – name of the group
  • commands (list of titus.inspector.defs.Command) – commands in this group
action(args)

Perform the action associated associated with this command group: descend into the subcommand and call its action method.

Parameters:args (list of titus.inspector.parser.Ast) – arguments passed to the command
Return type:None
Returns:nothing; results must be printed to the screen
complete(established, active)

Handle tab-complete for the command group: either expanding the subcommand name or deferring to the subcommand’s complete method.

Parameters:
  • established (string) – part of the text that has been established
  • active (string) – part of the text to be completed
Return type:

list of strings

Returns:

potential completions