From 16510e976899d9d2d297ee3e62bed02df15cb420 Mon Sep 17 00:00:00 2001 From: m1stadev Date: Wed, 27 Dec 2023 12:05:42 -0600 Subject: [PATCH] cli: add -h as shortcut to --help --- README.md | 2 +- pyimg4/__main__.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5184d83..a4c7469 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Usage: pyimg4 [OPTIONS] COMMAND [ARGS]... Options: --version Show the version and exit. - --help Show this message and exit. + -h, --help Show this message and exit. Commands: im4m Image4 manifest commands. diff --git a/pyimg4/__main__.py b/pyimg4/__main__.py index 1fd6100..653cae7 100644 --- a/pyimg4/__main__.py +++ b/pyimg4/__main__.py @@ -7,8 +7,10 @@ import pyimg4 from pyimg4 import Compression, Keybag +CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) -@click.group() + +@click.group(context_settings=CONTEXT_SETTINGS) @click.version_option(message=f'PyIMG4 {pyimg4.__version__}') def cli(): """A Python CLI tool for parsing Apple's Image4 format."""