def help(ctx, command_name):
"""
Shows main command list.
"""
from ..cli import cli
# Find subcommand
if command_name:
subcommand = cli.get_command(None, command_name)
if subcommand is None:
click.echo(RED("There is no command {}".format(command_name)))
sys.exit(1)
else:
# Override info name so help prints correctly
ctx.info_name = subcommand.name
click.echo(subcommand.get_help(ctx))
# Print main help
else:
ctx.info_name = "bay"
ctx.parent = None
click.echo(cli.get_help(ctx))
评论列表
文章目录