Adds a copy of `command` that can be invoked under the name `alias`.
(command: click.Command, alias: str)
| 390 | |
| 391 | |
| 392 | def add_hidden_alias(command: click.Command, alias: str): |
| 393 | """Adds a copy of `command` that can be invoked under the name `alias`.""" |
| 394 | # Shallow copy: deepcopy fails on Python 3.10 + click >=8.3 because click's internal |
| 395 | # `Sentinel` enum values are not deepcopy-safe. |
| 396 | hidden_command = copy(command) |
| 397 | hidden_command.hidden = True |
| 398 | scenedetect.add_command(hidden_command, alias) |
| 399 | |
| 400 | |
| 401 | @click.command("help", cls=Command) |