|Reported by:||Remy Blank||Owned by:||Remy Blank|
trac-admin commands are implemented in
trac/admin/console.py. As suggested by Christian in comment:11:ticket:7723, it would be nice to modularize it by introducing an
IAdminCommandProvider. The advantages would be:
- Make it easier to write commands.
- Allow plugins to add commands to
- Minimize code duplication for command parsing and auto-completion.
- Move code into the individual modules, where it belongs. This would also allow console and web admin modules to use common code.
I have started working on this, and the first patch below is a proposal for the interface, for the command manager, and the changes to be done for one set of commands (the
I don't think that it would be necessary to work on this in a branch, as the new interface can be introduced without breaking backward compatibility, and commands can be migrated to modules progressively.
Comments very welcome.