Skip to content

Commit 351b912

Browse files
committed
Update README.md to explictly state that cmd2 supports Typer-style syntax for specifying command arguments using type annotations
1 parent 4f7a610 commit 351b912

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ if __name__ == "__main__":
5858
App().cmdloop()
5959
```
6060

61+
`cmd2` supports [Typer](https://typer.tiangolo.com/)-style syntax for specifying command arguments
62+
with type annotations. In this example, `@cmd2.with_annotated` turns `name` and `count` into a
63+
positional argument and an option.
64+
6165
Run it with `python app.py`. Your new `greet` command already has input validation, generated help,
6266
and tab completion for its options. The application also includes discoverable help, command
6367
history, aliases, macros, scripting, shell integration, and other built-in commands.

0 commit comments

Comments
 (0)