From d6d1fbcf16d66c683d7ea80b88cbacdeddc3b30e Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Fri, 15 Oct 2021 15:42:50 +0200 Subject: [PATCH] Output help string if no arguments are received --- src/wireviz/wv_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wireviz/wv_cli.py b/src/wireviz/wv_cli.py index 167e761..a87a08b 100644 --- a/src/wireviz/wv_cli.py +++ b/src/wireviz/wv_cli.py @@ -18,7 +18,7 @@ format_codes = {'c': 'csv', 'g': 'gv', 'h': 'html', 'p': 'png', 'P': 'pdf', 's': epilog = 'The -f or --format option accepts a string containing one or more of the following characters to specify which file types to output:\n' epilog += ', '.join([f'{key} ({value.upper()})' for key, value in format_codes.items()]) -@click.command(epilog=epilog) +@click.command(epilog=epilog, no_args_is_help=True) @click.argument('file', nargs=-1) @click.option('-f', '--format', default='hpst', type=str, show_default=True, help='Output formats (see below).') @click.option('-p', '--prepend', default=None, type=Path, help='YAML file to prepend to the input file (optional).')