click-default-group
click-default-group copied to clipboard
click-default-group breaks click-repl
From https://github.com/pallets/click/issues/430#issuecomment-282015177:
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)
Why is it preferred versus the following
I tried that, and couldn't get all the arguments being passed to the subcommand to work.