Skip to content

Commit e4c28a4

Browse files
MorgenPronkPronksvlandeg
authored
📝 Clarify single-command vs multi-command behaviour in README (#1268)
Co-authored-by: Pronk <[email protected]> Co-authored-by: svlandeg <[email protected]>
1 parent de67723 commit e4c28a4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ Goodbye Ms. Camila. Have a good day.
318318

319319
</div>
320320

321+
**Note**: If your app only has one command, by default the command name is **omitted** in usage: `python main.py Camila`. However, when there are multiple commands, you must **explicitly include the command name**: `python main.py hello Camila`. See [One or Multiple Commands](https://typer.tiangolo.com/tutorial/commands/one-or-multiple/) for more details.
322+
321323
### Recap
322324

323325
In summary, you declare **once** the types of parameters (*CLI arguments* and *CLI options*) as function parameters.

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ Goodbye Ms. Camila. Have a good day.
324324

325325
</div>
326326

327+
**Note**: If your app only has one command, by default the command name is **omitted** in usage: `python main.py Camila`. However, when there are multiple commands, you must **explicitly include the command name**: `python main.py hello Camila`. See [One or Multiple Commands](https://typer.tiangolo.com/tutorial/commands/one-or-multiple/) for more details.
328+
327329
### Recap
328330

329331
In summary, you declare **once** the types of parameters (*CLI arguments* and *CLI options*) as function parameters.

0 commit comments

Comments
 (0)