(cmd: DecoratorCallable)
| 3683 | Decorator to register a command |
| 3684 | """ |
| 3685 | def func(cmd: DecoratorCallable) -> DecoratorCallable: |
| 3686 | cmd.cliutil_type = _CLIUtilMetaclass.TYPE.COMMAND # type: ignore |
| 3687 | cmd._spaces = spaces # type: ignore |
| 3688 | cmd._globsupport = globsupport # type: ignore |
| 3689 | cls._inspectkwargs(cmd) |
| 3690 | if cmd._globsupport and not cmd._spaces: # type: ignore |
| 3691 | raise ValueError("Cannot use globsupport without spaces.") |
| 3692 | return cmd |
| 3693 | return func |
| 3694 | |
| 3695 | @classmethod |