refactor(templates): rename show to list for CLI consistency
Other subcommand groups (server, env, ssh, webpage, git proxy) use `list` for enumeration; align templates with the same convention.
This commit is contained in:
@@ -47,7 +47,7 @@ For any subcommand: `mytoolkit <cmd> --help`.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
mytoolkit templates register /path/to/templates
|
mytoolkit templates register /path/to/templates
|
||||||
mytoolkit templates show # lists each template with its absolute path
|
mytoolkit templates list # lists each template with its absolute path
|
||||||
```
|
```
|
||||||
|
|
||||||
Registry is stored at `~/.config/mytoolkit/templates.json`.
|
Registry is stored at `~/.config/mytoolkit/templates.json`.
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ def templates_register(path):
|
|||||||
click.secho(f"Registered: {resolved}", fg="green")
|
click.secho(f"Registered: {resolved}", fg="green")
|
||||||
|
|
||||||
|
|
||||||
@templates_cmd.command("show")
|
@templates_cmd.command("list")
|
||||||
def templates_show():
|
def templates_list():
|
||||||
"""Show the current registry and available templates."""
|
"""List the current registry and available templates."""
|
||||||
if not templates_registry.CONFIG_PATH.exists():
|
if not templates_registry.CONFIG_PATH.exists():
|
||||||
click.echo("No registry. Run: mytoolkit templates register <path>")
|
click.echo("No registry. Run: mytoolkit templates register <path>")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user