:memo: Fix wording to avoid confusion between CLI program, command, subcommand
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Sebastián Ramírez · committed by Sebastián Ramírez · parent b883516 · Browse files · 4 files·+7 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+7 added−7 removed
- other:+7 added−7 removed
Provenance
- Commit
0ece3b9- Tree
fa913ce- Author
Sebastián Ramírez <tiangolo@gmail.com>- Committer
Sebastián Ramírez <tiangolo@gmail.com>- Parent
b883516
4 files changed+7 added−7 removed
modified:docs/tutorial/arguments.md+4 added-4 removed
11 unmodified lines12 But you can change that.13 14 In fact, it's very common to have **optional** *CLI arguments*, it's way more common than having **required** *CLI options*.15 16-As an example of how it could be useful, let's see how the `ls` command works.16+As an example of how it could be useful, let's see how the `ls` CLI program works.17 18 <div class="termy">19 20 ```console136 unmodified lines157 158 </div>159 160 !!! tip161- Notice that "`Camila`" here is an optional *CLI argument*, not a *CLI option*, because we didn't use something like "`--name Camila`", we just passed "`Camila`" directly to the program/command.161+ Notice that "`Camila`" here is an optional *CLI argument*, not a *CLI option*, because we didn't use something like "`--name Camila`", we just passed "`Camila`" directly to the program.162 163 ## An optional *CLI argument* with a default164 165 We can also make a *CLI argument* have a default value other than `None`:27 unmodified lines193 They are normally required and, when present, they are normally the main subject of whatever the command is doing.194 195 For that reason, Typer (actually Click underneath) doesn't attempt to automatically document *CLI arguments*.196 197-And you should document them as part of the command documentation, normally in a <abbr title="a multi-line string as the first expression inside a function (not assigned to any variable) used for documentation">docstring</abbr>.197+And you should document them as part of the CLI app documentation, normally in a <abbr title="a multi-line string as the first expression inside a function (not assigned to any variable) used for documentation">docstring</abbr>.198 199 Check the last example from the <a href="https://typer.tiangolo.com/tutorial/first-steps/#document-your-cli-app" target="_blank">First Steps</a>:200 201 ```Python hl_lines="5 6 7 8 9"202 {!./src/first_steps/tutorial006.py!}203 ```204 205-Here the *CLI argument* `NAME` is documented as part of the command help text.205+Here the *CLI argument* `NAME` is documented as part of the help text.206 207 You should document your *CLI arguments* the same way.208 209 ## Other uses4 unmodified linesmodified:docs/features.md+1 added-1 removed
40 unmodified lines4142434445454647484928 unmodified lines40 unmodified lines## User friendly CLI apps
The resulting CLI apps created with **Typer** have the nice features of many "pro" command line programs you probably already love.
* Automatic help commands and options.* Automatic help options for the main CLI program and all the its subcommands.* Automatic command and subcommand structure handling (you will see more about subcommands in the Tutorial - User Guide).* Automatic autocompletion for the CLI app in all operating systems, in all the shells (Bash, Zsh, Fish, PowerShell), so that the final user of your app can just hit <kbd>TAB</kbd> and get the available options or subcommands. *
!!! note "* Autocompletion"28 unmodified linesmodified:docs/index.md+1 added-1 removed
29 unmodified lines30 31 The key features are:32 33 * **Intuitive to write**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs.34-* **Easy to use**: It's easy to use for the final users. Automatic help commands, and (optional) automatic completion for all shells.34+* **Easy to use**: It's easy to use for the final users. Automatic help, and (optional) automatic completion for all shells.35 * **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.36 * **Start simple**: The simplest example adds only 2 lines of code to your app: **1 import, 1 function call**.37 * **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups subcommands, with options and arguments.38 236 unmodified linesmodified:README.md+1 added-1 removed
29 unmodified lines30 31 The key features are:32 33 * **Intuitive to write**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging. Designed to be easy to use and learn. Less time reading docs.34-* **Easy to use**: It's easy to use for the final users. Automatic help commands, and (optional) automatic completion for all shells.34+* **Easy to use**: It's easy to use for the final users. Automatic help, and (optional) automatic completion for all shells.35 * **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.36 * **Start simple**: The simplest example adds only 2 lines of code to your app: **1 import, 1 function call**.37 * **Grow large**: Grow in complexity as much as you want, create arbitrarily complex trees of commands and groups subcommands, with options and arguments.38 236 unmodified lines