feat: add TLDR ArgumentAction and Rich-compatible prompt styling
- Introduce `ArgumentAction.TLDR` for showing concise usage examples - Add `rich_text_to_prompt_text()` to support Rich-style markup in all prompt_toolkit inputs - Migrate all prompt-based Actions to use `prompt_message` with Rich styling support - Standardize `CancelSignal` as the default interrupt behavior for prompt-driven Actions
This commit is contained in:
@ -68,9 +68,16 @@ def default_config(parser: CommandArgumentParser) -> None:
|
||||
type=int,
|
||||
help="Optional number argument.",
|
||||
)
|
||||
parser.add_tldr_examples(
|
||||
[
|
||||
("web", "Deploy 'web' to the default location (New York)"),
|
||||
("cache London --tag beta", "Deploy 'cache' to London with tag"),
|
||||
("database --region us-west-2 --verbose", "Verbose deploy to west region"),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
flx = Falyx("Argument Examples")
|
||||
flx = Falyx("Argument Examples", program="argument_examples.py")
|
||||
|
||||
flx.add_command(
|
||||
key="T",
|
||||
|
Reference in New Issue
Block a user