From 739f07d687e9120b9a75ad537814f7d8f2e7a697 Mon Sep 17 00:00:00 2001 From: Alex Ott Date: Wed, 26 Jun 2024 10:07:45 +0300 Subject: [PATCH] Add the short option for help command: `-h` It's much easier for people use `-h` command-line switch instead of longer `--help` to retrieve the help about CLI or a specific command. This PR extends the current behavior by allowing the short option as well in addition to longer one. --- sigma/cli/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sigma/cli/main.py b/sigma/cli/main.py index 6609f1f..f8466b9 100644 --- a/sigma/cli/main.py +++ b/sigma/cli/main.py @@ -37,7 +37,12 @@ from .pysigma import check_pysigma_command -@click.group() +CONTEXT_SETTINGS={ + "help_option_names": ['-h', '--help'] +} + + +@click.group(context_settings=CONTEXT_SETTINGS) def cli(): pass