From 5e063d844696326f5fd9e39530040aee68b87bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 5 Jan 2020 22:23:55 +0100 Subject: [PATCH 1/2] :memo: Update docs for First Steps --- docs/tutorial/first-steps.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/first-steps.md b/docs/tutorial/first-steps.md index 42509e3..e8c2ffa 100644 --- a/docs/tutorial/first-steps.md +++ b/docs/tutorial/first-steps.md @@ -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 ``` +!!! 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!} From 17b1748108a97faf99f084823fb4b1fe3bc999d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sun, 5 Jan 2020 22:24:27 +0100 Subject: [PATCH 2/2] :memo: Add all the latest docs to MkDocs --- mkdocs.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 39a3886..a737e97 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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'