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

📝 Remove obsolete references to --install-completion for typer.run() scripts #595

Merged
merged 1 commit into from
May 2, 2023
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
4 changes: 0 additions & 4 deletions docs/tutorial/arguments/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Arguments:
[NAME] [default: Wade Wilson]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// With no optional CLI argument
Expand Down Expand Up @@ -98,8 +96,6 @@ Arguments:
[NAME] [default: (dynamic)]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try it several times, it will use a random default each time
Expand Down
6 changes: 0 additions & 6 deletions docs/tutorial/arguments/envvar.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Arguments:
[NAME] [env var: AWESOME_NAME;default: World]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Call it without a CLI argument
Expand Down Expand Up @@ -91,8 +89,6 @@ Arguments:
[NAME] [env var: AWESOME_NAME, GOD_NAME;default: World]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try the first env var
Expand Down Expand Up @@ -142,8 +138,6 @@ Arguments:
[NAME] [default: World]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// But it will still be able to use it
Expand Down
20 changes: 0 additions & 20 deletions docs/tutorial/arguments/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Arguments:
NAME The name of the user to greet [required]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
```

Expand Down Expand Up @@ -83,8 +81,6 @@ Arguments:
NAME The name of the user to greet [required]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
```

Expand Down Expand Up @@ -125,8 +121,6 @@ Arguments:
[NAME] Who to greet [default: World]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
```

Expand Down Expand Up @@ -165,9 +159,6 @@ Arguments:
[NAME] Who to greet

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.

--help Show this message and exit.
```

Expand Down Expand Up @@ -211,8 +202,6 @@ Arguments:


Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// See it shows "(Deadpoolio the amazing's name)" instead of the actual default of "Wade Wilson"
Expand Down Expand Up @@ -270,8 +259,6 @@ Arguments:
✨username✨ [default: World]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
```

Expand Down Expand Up @@ -319,11 +306,6 @@ $ python main.py --help
<font color="#A5A5A1">│ age </font><font color="#A37F4E"><b>[AGE] </b></font> The user&apos;s age │
<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>
<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> Install completion for the current │
<font color="#A5A5A1">│ shell. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> Show completion for the current │
<font color="#A5A5A1">│ shell, to copy it or customize the │</font>
<font color="#A5A5A1">│ installation. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> Show this message and exit. │
<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>
```
Expand Down Expand Up @@ -372,8 +354,6 @@ Usage: main.py [OPTIONS] [NAME]
Say hi to NAME very gently, like Dirk.

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
```

Expand Down
2 changes: 0 additions & 2 deletions docs/tutorial/arguments/optional.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ Arguments:
[NAME]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
```

Expand Down
5 changes: 5 additions & 0 deletions docs/tutorial/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ Options:

There's a little detail that is worth noting here.

Now the help shows two new *CLI options*:

* `--install-completion`
* `--show-completion`

To get shell/tab completion, it's necessary to build a package that you and your users can install and **call directly**.

So instead of running a Python script like:
Expand Down
30 changes: 0 additions & 30 deletions docs/tutorial/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ $ python main.py --help
<b> </b><font color="#F4BF75"><b>Usage: </b></font><b>main.py [OPTIONS] </b>
<b> </b>
<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────╮</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> Install completion │
<font color="#A5A5A1">│ for the current │</font>
<font color="#A5A5A1">│ shell. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> Show completion for │
<font color="#A5A5A1">│ the current shell, │</font>
<font color="#A5A5A1">│ to copy it or │</font>
<font color="#A5A5A1">│ customize the │</font>
<font color="#A5A5A1">│ installation. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> Show this message │
<font color="#A5A5A1">│ and exit. │</font>
<font color="#A5A5A1">╰───────────────────────────────────────────────────╯</font>
Expand Down Expand Up @@ -251,12 +243,6 @@ $ python main.py --help
<font color="#A5A5A1">╰─────────────────────────────────────────────────────────────────╯</font>
<font color="#A5A5A1">╭─ Options ───────────────────────────────────────────────────────╮</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--formal</b></font> <font color="#AE81FF"><b>--no-formal</b></font> [default: no-formal] │
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> Install completion for │
<font color="#A5A5A1">│ the current shell. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> Show completion for │
<font color="#A5A5A1">│ the current shell, to │</font>
<font color="#A5A5A1">│ copy it or customize │</font>
<font color="#A5A5A1">│ the installation. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> Show this message and │
<font color="#A5A5A1">│ exit. │</font>
<font color="#A5A5A1">╰─────────────────────────────────────────────────────────────────╯</font>
Expand Down Expand Up @@ -316,14 +302,6 @@ $ python main.py --help
<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--lastname</b></font> <font color="#F4BF75"><b>TEXT</b></font> │
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--formal</b></font> <font color="#AE81FF"><b>--no-formal</b></font> <font color="#F4BF75"><b> </b></font> [default: no-formal] │
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> <font color="#F4BF75"><b> </b></font> Install completion │
<font color="#A5A5A1">│ for the current │</font>
<font color="#A5A5A1">│ shell. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> <font color="#F4BF75"><b> </b></font> Show completion for │
<font color="#A5A5A1">│ the current shell, │</font>
<font color="#A5A5A1">│ to copy it or │</font>
<font color="#A5A5A1">│ customize the │</font>
<font color="#A5A5A1">│ installation. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> <font color="#F4BF75"><b> </b></font> Show this message │
<font color="#A5A5A1">│ and exit. │</font>
<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>
Expand Down Expand Up @@ -394,14 +372,6 @@ $ python main.py --help
<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--lastname</b></font> <font color="#F4BF75"><b>TEXT</b></font> │
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--formal</b></font> <font color="#AE81FF"><b>--no-formal</b></font> <font color="#F4BF75"><b> </b></font> [default: no-formal] │
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> <font color="#F4BF75"><b> </b></font> Install completion │
<font color="#A5A5A1">│ for the current │</font>
<font color="#A5A5A1">│ shell. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> <font color="#F4BF75"><b> </b></font> Show completion for │
<font color="#A5A5A1">│ the current shell, │</font>
<font color="#A5A5A1">│ to copy it or │</font>
<font color="#A5A5A1">│ customize the │</font>
<font color="#A5A5A1">│ installation. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> <font color="#F4BF75"><b> </b></font> Show this message │
<font color="#A5A5A1">│ and exit. │</font>
<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ Arguments:
[NAMES]... Select 3 characters to play with [default: Harry, Hermione, Ron]

Options:
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Use it with its defaults
Expand Down
2 changes: 0 additions & 2 deletions docs/tutorial/multiple-values/options-with-multiple-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ Usage: main.py [OPTIONS]

Options:
--user &lt;TEXT INTEGER BOOLEAN&gt;...
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Now try it
Expand Down
9 changes: 0 additions & 9 deletions docs/tutorial/options/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ Arguments:
Options:
--lastname TEXT Last name of person to greet. [default: ]
--formal / --no-formal Say hi formally. [default: False]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Now you have a help text for the --lastname and --formal CLI options 🎉
Expand Down Expand Up @@ -103,11 +101,6 @@ $ python main.py --help
<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>
<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--lastname</b></font> <font color="#F4BF75"><b>TEXT</b></font> Last name of person to greet. │
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> <font color="#F4BF75"><b> </b></font> Install completion for the │
<font color="#A5A5A1">│ current shell. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> <font color="#F4BF75"><b> </b></font> Show completion for the current │
<font color="#A5A5A1">│ shell, to copy it or customize │</font>
<font color="#A5A5A1">│ the installation. │</font>
<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> <font color="#F4BF75"><b> </b></font> Show this message and exit. │
<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>
<font color="#A5A5A1">╭─ Customization and Utils ─────────────────────────────────────────╮</font>
Expand Down Expand Up @@ -164,8 +157,6 @@ Usage: main.py [OPTIONS]

Options:
--fullname TEXT
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Notice there's no [default: Wade Wilson] 🔥
Expand Down
10 changes: 0 additions & 10 deletions docs/tutorial/options/name.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ Usage: main.py [OPTIONS]

Options:
--name TEXT [required]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try it
Expand Down Expand Up @@ -226,8 +224,6 @@ Usage: main.py [OPTIONS]

Options:
-n, --name TEXT [required]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try the short version
Expand Down Expand Up @@ -269,8 +265,6 @@ Usage: main.py [OPTIONS]

Options:
-n TEXT [required]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try it
Expand Down Expand Up @@ -313,8 +307,6 @@ Usage: main.py [OPTIONS]

Options:
-n, --user-name TEXT [required]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try it
Expand Down Expand Up @@ -366,8 +358,6 @@ Usage: main.py [OPTIONS]
Options:
-n, --name TEXT [required]
-f, --formal
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// Try the short versions
Expand Down
2 changes: 0 additions & 2 deletions docs/tutorial/options/required.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ Usage: main.py [OPTIONS] NAME

Options:
--lastname TEXT [required]
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.

// It now tells you that --lastname is required 🎉
Expand Down
3 changes: 0 additions & 3 deletions docs/tutorial/options/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ Usage: main.py [OPTIONS]
Options:
--version
--name TEXT
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.

--help Show this message and exit.


Expand Down
Loading