(self, verb, command, description=None, alias=None)
| 833 | self.default_verb = '' |
| 834 | |
| 835 | def register_command(self, verb, command, description=None, alias=None): |
| 836 | # type: (Any, CliCommand, Optional[str], Optional[str]) -> None |
| 837 | verb = verb.lower() |
| 838 | self._commands[verb] = command |
| 839 | if not description: |
| 840 | if isinstance(command, GroupCommandNew): |
| 841 | description = command.description |
| 842 | elif isinstance(command, Command): |
| 843 | parser = command.get_parser() |
| 844 | if parser: |
| 845 | description = parser.description |
| 846 | if description: |
| 847 | self._command_info[verb] = description |
| 848 | if alias: |
| 849 | self._aliases[alias] = verb |
| 850 | |
| 851 | def execute_args(self, params, args, **kwargs): # type: (KeeperParams, str, dict) -> any |
| 852 | if args.startswith('-- '): |
no test coverage detected