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 used the GitHub search to find a similar question and didn't find it.
I searched the Typer documentation, with the integrated search.
I already searched in Google "How to X in Typer" and didn't find any information.
I already read and followed all the tutorial in the docs and didn't find an answer.
I already checked if it is not related to Typer but to Click.
Commit to Help
I commit to help with one of those options 👆
Example Code
# (taken verbatim from the tutorial)importclickimporttyper@click.group()defcli():
pass@cli.command()definitdb():
click.echo("Initialized the database")
@cli.command()defdropdb():
click.echo("Dropped the database")
app=typer.Typer()
@app.command()defsub():
""" A single-command Typer sub app """print("Typer is now below Click, the Click app is the top level")
typer_click_object=typer.main.get_command(app)
cli.add_command(typer_click_object, "sub")
if__name__=="__main__":
cli()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
main.py sub --install-completion
)Operating System
Linux
Operating System Details
Fedora 37
Typer Version
0.7.0
Python Version
Python 3.11.2
Additional Context
I'm not sure whether completion is supposed to be supported or not in this use case.
Beta Was this translation helpful? Give feedback.
All reactions