Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

click-default-group breaks click-repl #4

Open
oberstet opened this issue Feb 23, 2017 · 1 comment
Open

click-default-group breaks click-repl #4

oberstet opened this issue Feb 23, 2017 · 1 comment
Assignees

Comments

@oberstet
Copy link

From pallets/click#430 (comment):

Using

@click.group(cls=DefaultGroup, default='shell', default_if_no_args=True)

breaks the auto-completion integration with prompt-toolkit from click-repl.

Why is it preferred versus the following anyway (which works, and does not break click-repl?

@click.group(invoke_without_command=True)
@click.option(
    '--profile',
    help='profile to use',
    default=u'default'
)
@click.pass_context
def cli(ctx, profile):
    ctx.obj = Config(_app, profile)
    if ctx.invoked_subcommand is None:
        ctx.invoke(cmd_shell)
@sublee sublee self-assigned this Apr 6, 2017
@jorhett
Copy link

jorhett commented Mar 28, 2022

Why is it preferred versus the following

I tried that, and couldn't get all the arguments being passed to the subcommand to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants