📝 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
Provenance
- Commit
413d585- Tree
d872df6- Author
Sebastián Ramírez <tiangolo@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
4c6098f
17 files changed+5 added−106 removed
modified:docs/tutorial/arguments/default.md-4 removed
39 unmodified lines4041424344454445464747 unmodified lines959697981011029910010110218 unmodified lines39 unmodified linesArguments: [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$ python main.py47 unmodified linesArguments: [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$ python main.py18 unmodified linesmodified:docs/tutorial/arguments/envvar.md-6 removed
29 unmodified lines30 Arguments:31 [NAME] [env var: AWESOME_NAME;default: World]32 33 Options: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.35 36 // Call it without a CLI argument37 $ python main.py50 unmodified lines88 Arguments:89 [NAME] [env var: AWESOME_NAME, GOD_NAME;default: World]90 91 Options: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.93 94 // Try the first env var95 $ AWESOME_NAME=Wednesday python main.py41 unmodified lines137 Arguments:138 [NAME] [default: World]139 140 Options: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.142 143 // But it will still be able to use it144 $ AWESOME_NAME=Wednesday python main.py10 unmodified linesmodified:docs/tutorial/arguments/help.md-20 removed
39 unmodified lines40 Arguments:41 NAME The name of the user to greet [required]42 43 Options: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 ```46 47 </div>32 unmodified lines80 Arguments:81 NAME The name of the user to greet [required]82 83 Options: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 ```86 87 </div>32 unmodified lines120 Arguments:121 [NAME] Who to greet [default: World]122 123 Options: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 ```126 127 </div>30 unmodified lines158 Arguments:159 [NAME] Who to greet160 161 Options: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.170-162 --help Show this message and exit.163 ```164 165 </div>35 unmodified lines201 [NAME] Who to greet [default: (Deadpoolio the amazing's name)]202 203 204 Options: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.206 207 // See it shows "(Deadpoolio the amazing's name)" instead of the actual default of "Wade Wilson"208 ```49 unmodified lines258 Arguments:259 ✨username✨ [default: World]260 261 Options: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 ```264 265 </div>39 unmodified lines305 <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'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 lines353 354 Say hi to NAME very gently, like Dirk.355 356 Options: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 ```359 360 </div>28 unmodified linesmodified:docs/tutorial/arguments/optional.md-2 removed
137 unmodified lines138 Arguments:139 [NAME]140 141 Options: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 ```144 145 </div>88 unmodified linesmodified:docs/tutorial/commands/index.md+5 added
116 unmodified lines117 ## CLI application completion118 119 There's a little detail that is worth noting here.120 121+Now the help shows two new *CLI options*:122+123+* `--install-completion`124+* `--show-completion`125+126 To get shell/tab completion, it's necessary to build a package that you and your users can install and **call directly**.127 128 So instead of running a Python script like:129 105 unmodified linesmodified:docs/tutorial/multiple-values/arguments-with-multiple-values.md-2 removed
58 unmodified lines59 Arguments:60 [NAMES]... Select 3 characters to play with [default: Harry, Hermione, Ron]61 62 Options: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.64 65 // Use it with its defaults66 $ python main.py19 unmodified linesmodified:docs/tutorial/multiple-values/options-with-multiple-values.md-2 removed
77 unmodified lines78 Usage: main.py [OPTIONS]79 80 Options:81 --user <TEXT INTEGER BOOLEAN>...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.83 84 // Now try it85 $ python main.py --user Camila 50 yes16 unmodified linesmodified:docs/tutorial/options/help.md-9 removed
52 unmodified lines53 54 Options: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.58 59 // Now you have a help text for the --lastname and --formal CLI options 🎉60 ```39 unmodified lines100 <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 lines156 Usage: main.py [OPTIONS]157 158 Options: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.161 162 // Notice there's no [default: Wade Wilson] 🔥163 ```7 unmodified linesmodified:docs/tutorial/options/name.md-10 removed
64 unmodified lines65 Usage: main.py [OPTIONS]66 67 Options: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.70 71 // Try it72 $ python --name Camila150 unmodified lines223 Usage: main.py [OPTIONS]224 225 Options: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.228 229 // Try the short version230 $ python main.py -n Camila33 unmodified lines264 Usage: main.py [OPTIONS]265 266 Options: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.269 270 // Try it271 $ python main.py -n Camila34 unmodified lines306 Usage: main.py [OPTIONS]307 308 Options: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.311 312 // Try it313 $ python main.py --user-name Camila43 unmodified lines357 358 Options: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.362 363 // Try the short versions364 $ python main.py -n Camila -f11 unmodified linesmodified:docs/tutorial/options/required.md-2 removed
65 unmodified lines66 Usage: main.py [OPTIONS] NAME67 68 Options: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.71 72 // It now tells you that --lastname is required 🎉73 ```2 unmodified linesmodified:docs/tutorial/options/version.md-3 removed
41 unmodified lines42 43 Options: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.48-46 --help Show this message and exit.47 48 49 // We can call it normally88 unmodified linesmodified:docs/tutorial/parameter-types/bool.md-8 removed
34 unmodified lines35 Usage: main.py [OPTIONS]36 37 Options: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.40 41 // Try it:42 $ python main.py53 unmodified lines96 Usage: main.py [OPTIONS]97 98 Options: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.101 102 // Try it103 $ python main.py46 unmodified lines150 Usage: main.py [OPTIONS]151 152 Options: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.155 156 // Try with the short name -f157 $ python main.py -f46 unmodified lines204 Usage: main.py [OPTIONS]205 206 Options: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.209 210 // Try it211 $ python main.py15 unmodified linesmodified:docs/tutorial/parameter-types/datetime.md-2 removed
23 unmodified lines24 Arguments:25 BIRTH:[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S][required]26 27 Options: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.29 30 // Pass a datetime31 $ python main.py 1956-01-31T10:00:0064 unmodified linesmodified:docs/tutorial/parameter-types/enum.md-2 removed
19 unmodified lines20 Usage: main.py [OPTIONS]21 22 Options: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.25 26 // Try it27 $ python main.py --network conv50 unmodified linesmodified:docs/tutorial/parameter-types/index.md-2 removed
31 unmodified lines32 Options: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.37 38 // Call it with CLI parameters39 $ python main.py Camila --age 15 --height-meters 1.70 --female27 unmodified linesmodified:docs/tutorial/parameter-types/number.md-2 removed
33 unmodified lines34 35 Options: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.39 40 // Pass all the CLI parameters41 $ python main.py 5 --age 20 --score 90141 unmodified linesmodified:docs/tutorial/first-steps.md-30 removed
23 unmodified lines24 25 <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 lines242 <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 lines301 <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 lines371 <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