()
| 53 | |
| 54 | |
| 55 | def make_default_commands() -> dict[CommandName, type[Command]]: |
| 56 | result: dict[CommandName, type[Command]] = {} |
| 57 | for v in vars(commands).values(): |
| 58 | if isinstance(v, type) and issubclass(v, Command) and v.__name__[0].islower(): |
| 59 | result[v.__name__] = v |
| 60 | result[v.__name__.replace("_", "-")] = v |
| 61 | return result |
| 62 | |
| 63 | |
| 64 | default_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple( |