You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm @tiangolo or he asked me directly to create an issue here.
Issue Content
Show help items in order of definition, not alphabetically
For example:
importtyperapp=typer.Typer()
@app.command()deffirst(word: str|None=None):
""" First declared command should show up first. """print(f"first {word}")
@app.command()defafter(word: str|None=None):
""" Last declared command should show up last, not alphabetically. """print(f"after {word}")
This is the current output:
$ typer demo.py run --help Usage: typer [PATH_OR_MODULE] run [OPTIONS] COMMAND [ARGS]... Run the provided Typer app. ╭─ Options ────────────────────────────────────────────────────────────────╮│ --help Show this message and exit. │╰──────────────────────────────────────────────────────────────────────────╯╭─ Commands ───────────────────────────────────────────────────────────────╮│ after Last declared command should show up last, not alphabetically. ││ first First declared command should show up first. │╰──────────────────────────────────────────────────────────────────────────╯
This is the ideal output:
$ typer demo.py run --help Usage: typer [PATH_OR_MODULE] run [OPTIONS] COMMAND [ARGS]... Run the provided Typer app. ╭─ Options ────────────────────────────────────────────────────────────────╮│ --help Show this message and exit. │╰──────────────────────────────────────────────────────────────────────────╯╭─ Commands ───────────────────────────────────────────────────────────────╮│ first First declared command should show up first. ││ after Last declared command should show up last, not alphabetically. │╰──────────────────────────────────────────────────────────────────────────╯
The text was updated successfully, but these errors were encountered:
Privileged issue
Issue Content
Show help items in order of definition, not alphabetically
For example:
This is the current output:
This is the ideal output:
The text was updated successfully, but these errors were encountered: