Skip to content

click-default-group breaks click-repl #4

@oberstet

Description

@oberstet

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions