Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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

authored by Sebastián Ramírez · committed by GitHub · parent 4c6098f · Browse files · 17 files+5 added−106 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

17 files+5 added−106 removed

  • other:+5 added−106 removed

17 files+5 added−106 removed

modified:docs/tutorial/arguments/default.md-4 removed
modified:docs/tutorial/arguments/envvar.md-6 removed
29 unmodified lines
30Arguments:31 [NAME] [env var: AWESOME_NAME;default: World]3233Options:34 --install-completion Install completion for the current shell.35 --show-completion Show completion for the current shell, to copy it or customize the installation.34 --help Show this message and exit.3536// Call it without a CLI argument37$ python main.py
50 unmodified lines
88Arguments:89 [NAME] [env var: AWESOME_NAME, GOD_NAME;default: World]9091Options:94 --install-completion Install completion for the current shell.95 --show-completion Show completion for the current shell, to copy it or customize the installation.92 --help Show this message and exit.9394// Try the first env var95$ AWESOME_NAME=Wednesday python main.py
41 unmodified lines
137Arguments:138 [NAME] [default: World]139140Options:145 --install-completion Install completion for the current shell.146 --show-completion Show completion for the current shell, to copy it or customize the installation.141 --help Show this message and exit.142143// But it will still be able to use it144$ AWESOME_NAME=Wednesday python main.py
10 unmodified lines
modified:docs/tutorial/arguments/help.md-20 removed
39 unmodified lines
40Arguments:41 NAME The name of the user to greet [required]4243Options:44 --install-completion Install completion for the current shell.45 --show-completion Show completion for the current shell, to copy it or customize the installation.44 --help Show this message and exit.45```4647</div>
32 unmodified lines
80Arguments:81 NAME The name of the user to greet [required]8283Options:86 --install-completion Install completion for the current shell.87 --show-completion Show completion for the current shell, to copy it or customize the installation.84 --help Show this message and exit.85```8687</div>
32 unmodified lines
120Arguments:121 [NAME] Who to greet [default: World]122123Options:128 --install-completion Install completion for the current shell.129 --show-completion Show completion for the current shell, to copy it or customize the installation.124 --help Show this message and exit.125```126127</div>
30 unmodified lines
158Arguments:159 [NAME] Who to greet160161Options:168 --install-completion Install completion for the current shell.169 --show-completion Show completion for the current shell, to copy it or customize the installation.170162 --help Show this message and exit.163```164165</div>
35 unmodified lines
201 [NAME] Who to greet [default: (Deadpoolio the amazing's name)]202203204Options:214 --install-completion Install completion for the current shell.215 --show-completion Show completion for the current shell, to copy it or customize the installation.205 --help Show this message and exit.206207// See it shows "(Deadpoolio the amazing's name)" instead of the actual default of "Wade Wilson"208```
49 unmodified lines
258Arguments:259 ✨username✨ [default: World]260261Options:273 --install-completion Install completion for the current shell.274 --show-completion Show completion for the current shell, to copy it or customize the installation.262 --help Show this message and exit.263```264265</div>
39 unmodified lines
305<font color="#A5A5A1">│ lastname </font><font color="#A37F4E"><b>[LASTNAME]</b></font> The last name │306<font color="#A5A5A1">│ age </font><font color="#A37F4E"><b>[AGE] </b></font> The user&apos;s age │307<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>308<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>322<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> Install completion for the current │323<font color="#A5A5A1">│ shell. │</font>324<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> Show completion for the current │325<font color="#A5A5A1">│ shell, to copy it or customize the │</font>326<font color="#A5A5A1">│ installation. │</font>309<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> Show this message and exit. │310<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>311```312
40 unmodified lines
353354 Say hi to NAME very gently, like Dirk.355356Options:375 --install-completion Install completion for the current shell.376 --show-completion Show completion for the current shell, to copy it or customize the installation.357 --help Show this message and exit.358```359360</div>
28 unmodified lines
modified:docs/tutorial/arguments/optional.md-2 removed
137 unmodified lines
138Arguments:139 [NAME]140141Options:142 --install-completion Install completion for the current shell.143 --show-completion Show completion for the current shell, to copy it or customize the installation.142 --help Show this message and exit.143```144145</div>
88 unmodified lines
modified:docs/tutorial/commands/index.md+5 added
116 unmodified lines
117## CLI application completion118119There's a little detail that is worth noting here.120121Now the help shows two new *CLI options*:122123* `--install-completion`124* `--show-completion`125126To get shell/tab completion, it's necessary to build a package that you and your users can install and **call directly**.127128So instead of running a Python script like:129
105 unmodified lines
modified:docs/tutorial/multiple-values/arguments-with-multiple-values.md-2 removed
58 unmodified lines
59Arguments:60 [NAMES]... Select 3 characters to play with [default: Harry, Hermione, Ron]6162Options:63 --install-completion Install completion for the current shell.64 --show-completion Show completion for the current shell, to copy it or customize the installation.63 --help Show this message and exit.6465// Use it with its defaults66$ python main.py
19 unmodified lines
modified:docs/tutorial/multiple-values/options-with-multiple-values.md-2 removed
77 unmodified lines
78Usage: main.py [OPTIONS]7980Options:81 --user &lt;TEXT INTEGER BOOLEAN&gt;...82 --install-completion Install completion for the current shell.83 --show-completion Show completion for the current shell, to copy it or customize the installation.82 --help Show this message and exit.8384// Now try it85$ python main.py --user Camila 50 yes
16 unmodified lines
modified:docs/tutorial/options/help.md-9 removed
52 unmodified lines
5354Options:55 --lastname TEXT Last name of person to greet. [default: ]56 --formal / --no-formal Say hi formally. [default: False]57 --install-completion Install completion for the current shell.58 --show-completion Show completion for the current shell, to copy it or customize the installation.57 --help Show this message and exit.5859// Now you have a help text for the --lastname and --formal CLI options 🎉60```
39 unmodified lines
100<font color="#A5A5A1">│ </font><font color="#F92672">*</font> name <font color="#F4BF75"><b>TEXT</b></font> [default: None] <font color="#A6194C">[required]</font> │101<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>102<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>103<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--lastname</b></font> <font color="#F4BF75"><b>TEXT</b></font> Last name of person to greet. │106<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> <font color="#F4BF75"><b> </b></font> Install completion for the │107<font color="#A5A5A1">│ current shell. │</font>108<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> <font color="#F4BF75"><b> </b></font> Show completion for the current │109<font color="#A5A5A1">│ shell, to copy it or customize │</font>110<font color="#A5A5A1">│ the installation. │</font>104<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> <font color="#F4BF75"><b> </b></font> Show this message and exit. │105<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>106<font color="#A5A5A1">╭─ Customization and Utils ─────────────────────────────────────────╮</font>107<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--formal</b></font> <font color="#AE81FF"><b>--no-formal</b></font> Say hi formally. │
48 unmodified lines
156Usage: main.py [OPTIONS]157158Options:159 --fullname TEXT167 --install-completion Install completion for the current shell.168 --show-completion Show completion for the current shell, to copy it or customize the installation.160 --help Show this message and exit.161162// Notice there's no [default: Wade Wilson] 🔥163```
7 unmodified lines
modified:docs/tutorial/options/name.md-10 removed
64 unmodified lines
65Usage: main.py [OPTIONS]6667Options:68 --name TEXT [required]69 --install-completion Install completion for the current shell.70 --show-completion Show completion for the current shell, to copy it or customize the installation.69 --help Show this message and exit.7071// Try it72$ python --name Camila
150 unmodified lines
223Usage: main.py [OPTIONS]224225Options:226 -n, --name TEXT [required]229 --install-completion Install completion for the current shell.230 --show-completion Show completion for the current shell, to copy it or customize the installation.227 --help Show this message and exit.228229// Try the short version230$ python main.py -n Camila
33 unmodified lines
264Usage: main.py [OPTIONS]265266Options:267 -n TEXT [required]272 --install-completion Install completion for the current shell.273 --show-completion Show completion for the current shell, to copy it or customize the installation.268 --help Show this message and exit.269270// Try it271$ python main.py -n Camila
34 unmodified lines
306Usage: main.py [OPTIONS]307308Options:309 -n, --user-name TEXT [required]316 --install-completion Install completion for the current shell.317 --show-completion Show completion for the current shell, to copy it or customize the installation.310 --help Show this message and exit.311312// Try it313$ python main.py --user-name Camila
43 unmodified lines
357358Options:359 -n, --name TEXT [required]360 -f, --formal369 --install-completion Install completion for the current shell.370 --show-completion Show completion for the current shell, to copy it or customize the installation.361 --help Show this message and exit.362363// Try the short versions364$ python main.py -n Camila -f
11 unmodified lines
modified:docs/tutorial/options/required.md-2 removed
65 unmodified lines
66Usage: main.py [OPTIONS] NAME6768Options:69 --lastname TEXT [required]70 --install-completion Install completion for the current shell.71 --show-completion Show completion for the current shell, to copy it or customize the installation.70 --help Show this message and exit.7172// It now tells you that --lastname is required 🎉73```
2 unmodified lines
modified:docs/tutorial/options/version.md-3 removed
41 unmodified lines
4243Options:44 --version45 --name TEXT46 --install-completion Install completion for the current shell.47 --show-completion Show completion for the current shell, to copy it or customize the installation.4846 --help Show this message and exit.474849// We can call it normally
88 unmodified lines
modified:docs/tutorial/parameter-types/bool.md-8 removed
34 unmodified lines
35Usage: main.py [OPTIONS]3637Options:38 --force [default: False]39 --install-completion Install completion for the current shell.40 --show-completion Show completion for the current shell, to copy it or customize the installation.39 --help Show this message and exit.4041// Try it:42$ python main.py
53 unmodified lines
96Usage: main.py [OPTIONS]9798Options:99 --accept / --reject102 --install-completion Install completion for the current shell.103 --show-completion Show completion for the current shell, to copy it or customize the installation.100 --help Show this message and exit.101102// Try it103$ python main.py
46 unmodified lines
150Usage: main.py [OPTIONS]151152Options:153 -f, --force / -F, --no-force [default: False]158 --install-completion Install completion for the current shell.159 --show-completion Show completion for the current shell, to copy it or customize the installation.154 --help Show this message and exit.155156// Try with the short name -f157$ python main.py -f
46 unmodified lines
204Usage: main.py [OPTIONS]205206Options:207 / -d, --demo [default: True]214 --install-completion Install completion for the current shell.215 --show-completion Show completion for the current shell, to copy it or customize the installation.208 --help Show this message and exit.209210// Try it211$ python main.py
15 unmodified lines
modified:docs/tutorial/parameter-types/datetime.md-2 removed
23 unmodified lines
24Arguments:25 BIRTH:[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S][required]2627Options:28 --install-completion Install completion for the current shell.29 --show-completion Show completion for the current shell, to copy it or customize the installation.28 --help Show this message and exit.2930// Pass a datetime31$ python main.py 1956-01-31T10:00:00
64 unmodified lines
modified:docs/tutorial/parameter-types/enum.md-2 removed
19 unmodified lines
20Usage: main.py [OPTIONS]2122Options:23 --network [simple|conv|lstm] [default: simple]24 --install-completion Install completion for the current shell.25 --show-completion Show completion for the current shell, to copy it or customize the installation.24 --help Show this message and exit.2526// Try it27$ python main.py --network conv
50 unmodified lines
modified:docs/tutorial/parameter-types/index.md-2 removed
31 unmodified lines
32Options:33 --age INTEGER [default: 20]34 --height-meters FLOAT [default: 1.89]35 --female / --no-female [default: True]36 --install-completion Install completion for the current shell.37 --show-completion Show completion for the current shell, to copy it or customize the installation.36 --help Show this message and exit.3738// Call it with CLI parameters39$ python main.py Camila --age 15 --height-meters 1.70 --female
27 unmodified lines
modified:docs/tutorial/parameter-types/number.md-2 removed
33 unmodified lines
3435Options:36 --age INTEGER RANGE [default: 20]37 --score FLOAT RANGE [default: 0]38 --install-completion Install completion for the current shell.39 --show-completion Show completion for the current shell, to copy it or customize the installation.38 --help Show this message and exit.3940// Pass all the CLI parameters41$ python main.py 5 --age 20 --score 90
141 unmodified lines
modified:docs/tutorial/first-steps.md-30 removed
23 unmodified lines
2425<b> </b><font color="#F4BF75"><b>Usage: </b></font><b>main.py [OPTIONS] </b>26<b> </b>27<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────╮</font>28<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> Install completion │29<font color="#A5A5A1">│ for the current │</font>30<font color="#A5A5A1">│ shell. │</font>31<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> Show completion for │32<font color="#A5A5A1">│ the current shell, │</font>33<font color="#A5A5A1">│ to copy it or │</font>34<font color="#A5A5A1">│ customize the │</font>35<font color="#A5A5A1">│ installation. │</font>28<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> Show this message │29<font color="#A5A5A1">│ and exit. │</font>30<font color="#A5A5A1">╰───────────────────────────────────────────────────╯</font>31```
210 unmodified lines
242<font color="#A5A5A1">│ </font><font color="#F92672">*</font> lastname <font color="#F4BF75"><b>TEXT</b></font> [default: None] <font color="#A6194C">[required]</font> │243<font color="#A5A5A1">╰─────────────────────────────────────────────────────────────────╯</font>244<font color="#A5A5A1">╭─ Options ───────────────────────────────────────────────────────╮</font>245<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--formal</b></font> <font color="#AE81FF"><b>--no-formal</b></font> [default: no-formal] │254<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> Install completion for │255<font color="#A5A5A1">│ the current shell. │</font>256<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> Show completion for │257<font color="#A5A5A1">│ the current shell, to │</font>258<font color="#A5A5A1">│ copy it or customize │</font>259<font color="#A5A5A1">│ the installation. │</font>246<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> Show this message and │247<font color="#A5A5A1">│ exit. │</font>248<font color="#A5A5A1">╰─────────────────────────────────────────────────────────────────╯</font>249```
51 unmodified lines
301<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>302<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>303<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--lastname</b></font> <font color="#F4BF75"><b>TEXT</b></font> │304<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] │319<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> <font color="#F4BF75"><b> </b></font> Install completion │320<font color="#A5A5A1">│ for the current │</font>321<font color="#A5A5A1">│ shell. │</font>322<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> <font color="#F4BF75"><b> </b></font> Show completion for │323<font color="#A5A5A1">│ the current shell, │</font>324<font color="#A5A5A1">│ to copy it or │</font>325<font color="#A5A5A1">│ customize the │</font>326<font color="#A5A5A1">│ installation. │</font>305<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> <font color="#F4BF75"><b> </b></font> Show this message │306<font color="#A5A5A1">│ and exit. │</font>307<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>308```
62 unmodified lines
371<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>372<font color="#A5A5A1">╭─ Options ─────────────────────────────────────────────────────────╮</font>373<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--lastname</b></font> <font color="#F4BF75"><b>TEXT</b></font> │374<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] │397<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--install-completion</b></font> <font color="#F4BF75"><b> </b></font> Install completion │398<font color="#A5A5A1">│ for the current │</font>399<font color="#A5A5A1">│ shell. │</font>400<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--show-completion</b></font> <font color="#F4BF75"><b> </b></font> Show completion for │401<font color="#A5A5A1">│ the current shell, │</font>402<font color="#A5A5A1">│ to copy it or │</font>403<font color="#A5A5A1">│ customize the │</font>404<font color="#A5A5A1">│ installation. │</font>375<font color="#A5A5A1">│ </font><font color="#A1EFE4"><b>--help</b></font> <font color="#F4BF75"><b> </b></font> Show this message │376<font color="#A5A5A1">│ and exit. │</font>377<font color="#A5A5A1">╰───────────────────────────────────────────────────────────────────╯</font>378```
114 unmodified lines