From 3282ab689d8bf48db08c09917ec2e40bdc516f7f Mon Sep 17 00:00:00 2001 From: Daniel Xu Date: Sun, 11 Jan 2026 14:31:01 -0800 Subject: [PATCH 1/2] 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") From 1f049e068ec0497a62a2323badb76536094c99d6 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Mon, 19 Jan 2026 09:22:32 -0500 Subject: [PATCH 2/2] fixlint Signed-off-by: Edward Yang --- src/ghstack/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ghstack/cli.py b/src/ghstack/cli.py index ed5c747..ca7a3ec 100644 --- a/src/ghstack/cli.py +++ b/src/ghstack/cli.py @@ -48,7 +48,10 @@ def cli_context( yield shell, config, github -@click.group(invoke_without_command=True, context_settings={"help_option_names": ["-h", "--help"]}) +@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")