📝 Remove obsolete references to --install-completion
for typer.run()
scripts (#595)
📝 Remove obsolete references to --install-completion for typer.run() scripts
This commit is contained in:
parent
4c6098f9fe
commit
413d585f1f
17 changed files with 5 additions and 106 deletions
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
```
|
||||
|
||||
|
@ -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.
|
||||
```
|
||||
|
||||
|
@ -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.
|
||||
```
|
||||
|
||||
|
@ -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.
|
||||
```
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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.
|
||||
```
|
||||
|
||||
|
@ -319,11 +306,6 @@ $ python main.py --help
|
|||
<font color="#A5A5A1">│ age </font><font color="#A37F4E"><b>[AGE] </b></font> The user'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>
|
||||
```
|
||||
|
@ -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.
|
||||
```
|
||||
|
||||
|
|
|
@ -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.
|
||||
```
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -79,8 +79,6 @@ Usage: main.py [OPTIONS]
|
|||
|
||||
Options:
|
||||
--user <TEXT INTEGER BOOLEAN>...
|
||||
--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
|
||||
|
|
|
@ -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 🎉
|
||||
|
@ -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>
|
||||
|
@ -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] 🔥
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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 🎉
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
|
|
|
@ -36,8 +36,6 @@ Usage: main.py [OPTIONS]
|
|||
|
||||
Options:
|
||||
--force [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.
|
||||
|
||||
// Try it:
|
||||
|
@ -99,8 +97,6 @@ Usage: main.py [OPTIONS]
|
|||
|
||||
Options:
|
||||
--accept / --reject
|
||||
--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
|
||||
|
@ -155,8 +151,6 @@ Usage: main.py [OPTIONS]
|
|||
|
||||
Options:
|
||||
-f, --force / -F, --no-force [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.
|
||||
|
||||
// Try with the short name -f
|
||||
|
@ -211,8 +205,6 @@ Usage: main.py [OPTIONS]
|
|||
|
||||
Options:
|
||||
/ -d, --demo [default: True]
|
||||
--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
|
||||
|
|
|
@ -25,8 +25,6 @@ Arguments:
|
|||
BIRTH:[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S][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.
|
||||
|
||||
// Pass a datetime
|
||||
|
|
|
@ -21,8 +21,6 @@ Usage: main.py [OPTIONS]
|
|||
|
||||
Options:
|
||||
--network [simple|conv|lstm] [default: simple]
|
||||
--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
|
||||
|
|
|
@ -33,8 +33,6 @@ Options:
|
|||
--age INTEGER [default: 20]
|
||||
--height-meters FLOAT [default: 1.89]
|
||||
--female / --no-female [default: True]
|
||||
--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 with CLI parameters
|
||||
|
|
|
@ -35,8 +35,6 @@ Arguments:
|
|||
Options:
|
||||
--age INTEGER RANGE [default: 20]
|
||||
--score FLOAT RANGE [default: 0]
|
||||
--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.
|
||||
|
||||
// Pass all the CLI parameters
|
||||
|
|
Loading…
Reference in a new issue