cli: Add default to interactive flow in new command (#2398)

This commit is contained in:
Eugene Yurtsev
2024-11-12 16:38:15 -05:00
committed by GitHub
parent 2bcf1c0a20
commit cb10437c3f
+6 -3
View File
@@ -64,9 +64,12 @@ def _choose_template() -> str:
click.secho(template_name, fg="cyan", nl=False)
click.secho(f" - {template_info['description']}", fg="white")
# Get the template choice from user
template_choice: int = click.prompt(
"Enter the number of your template choice", type=int
# Get the template choice from the user, defaulting to the first template if blank
template_choice: Optional[int] = click.prompt(
"Enter the number of your template choice (default is 1)",
type=int,
default=1,
show_default=False,
)
template_keys = list(TEMPLATES.keys())