From 3282ab689d8bf48db08c09917ec2e40bdc516f7f Mon Sep 17 00:00:00 2001 From: Daniel Xu Date: Sun, 11 Jan 2026 14:31:01 -0800 Subject: [PATCH] Allow using `-h` for help It's common to support both `-h` and `--help`. I often find myself using `ghstack -h` and hitting an error. Signed-off-by: Daniel Xu --- src/ghstack/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ghstack/cli.py b/src/ghstack/cli.py index 1a7f4f7..ed5c747 100644 --- a/src/ghstack/cli.py +++ b/src/ghstack/cli.py @@ -48,7 +48,7 @@ def cli_context( yield shell, config, github -@click.group(invoke_without_command=True) +@click.group(invoke_without_command=True, context_settings={"help_option_names": ["-h", "--help"]}) @click.pass_context @click.version_option(ghstack.__version__, "--version", "-V") @click.option("--debug", is_flag=True, help="Log debug information to stderr")