Skip to content

Allow modular command definition #943

@anselor

Description

@anselor

Allow commands to be split into multiple classes that are registered with cmd2 instead of requiring all commands to be defined in one giant class.

Breakdown:

  • Define a base class for these satellite command definitions.
  • Everywhere in cmd2 where it introspects for do_, complete_, or help_ also search in the satellite command objects.
  • Stretch - auto-detect all satellite command definitions (by subclass) and load them automatically on init of cmd2.Cmd.
  • Example of loading a satellite command object

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions