Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #33

Merged
merged 2 commits into from
Jan 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/tutorial/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,23 @@ $ python main.py Camila
Hello Camila

// Here "Camila" is the CLI argument

// To pass a name with spaces for the same CLI argument, use quotes
$ python main.py "Camila Gutiérrez"

Hello Camila Gutiérrez
```

</div>

!!! tip
If you need to pass a single value that contains spaces to a *CLI argument*, use quotes (`"`) around it.

## Two CLI arguments

Now extend that to have 2 arguments, `name` and `lastname`:
Now let's say we want to have the name and last name separated.

So, extend that to have 2 arguments, `name` and `lastname`:

```Python hl_lines="4 5"
{!./src/first_steps/tutorial003.py!}
Expand Down
14 changes: 12 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,29 @@ nav:
- Command CLI Options: 'tutorial/commands/options.md'
- Command Help: 'tutorial/commands/help.md'
- Custom Command Name: 'tutorial/commands/name.md'
- Typer Callback: 'tutorial/commands/callback.md'
- One or Multiple Commands: 'tutorial/commands/one-or-multiple.md'
- CLI Parameter Types:
- CLI Parameter Types Intro: 'tutorial/parameter-types/index.md'
- Number: 'tutorial/parameter-types/number.md'
- Boolean CLI Options: 'tutorial/parameter-types/bool.md'
- UUID: 'tutorial/parameter-types/uuid.md'
- DateTime: 'tutorial/parameter-types/datetime.md'
- Enum - Choices: 'tutorial/parameter-types/enum.md'
- Path: 'tutorial/parameter-types/path.md'
- File: 'tutorial/parameter-types/file.md'
- SubCommands:
- SubCommands Intro: 'tutorial/subcommands/index.md'
- SubCommands - Command Groups:
- SubCommands - Command Groups - Intro: 'tutorial/subcommands/index.md'
- Add Typer: 'tutorial/subcommands/add-typer.md'
- SubCommands in a Single File: 'tutorial/subcommands/single-file.md'
- Nested SubCommands: 'tutorial/subcommands/nested-subcommands.md'
- Sub-Typer Callback Override: 'tutorial/subcommands/callback-override.md'
- SubCommand Name and Help: 'tutorial/subcommands/name-and-help.md'
- Multiple Values:
- Multiple Values Intro: 'tutorial/multiple-values/index.md'
- Multiple CLI Options: 'tutorial/multiple-values/multiple-options.md'
- CLI Options with Multiple Values: 'tutorial/multiple-values/options-with-multiple-values.md'
- CLI Arguments with Multiple Values: 'tutorial/multiple-values/arguments-with-multiple-values.md'
- Ask with Prompt: 'tutorial/prompt.md'
- Progress Bar: 'tutorial/progressbar.md'
- CLI Application Directory: 'tutorial/app-dir.md'
Expand Down