From f3af39b8e45632ba39d7ae6a4f0b435a1c8908a9 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Sun, 19 Jul 2026 23:35:19 +0900 Subject: [PATCH] Fix `-h` CLI option Fixes the `Unknown switch: "-h"` error message when running `erb -h`: ```sh-session $ libexec/erb -h 2>&1 | head -3 Unknown switch: "-h" Usage: erb [options] [filepaths] ``` The short `-h` option is already documented in the help message: ```sh-session $ libexec/erb --help 2>&1 | grep 'help' -h --help Print this text and exit. ``` --- libexec/erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/erb b/libexec/erb index de7d588..76635be 100755 --- a/libexec/erb +++ b/libexec/erb @@ -89,7 +89,7 @@ class ERB set_encoding(Encoding::UTF_8, Encoding::UTF_8) when '-P' disable_percent = true - when '--help' + when '-h', '--help' raise '' when /\A-/ raise "Unknown switch: #{switch.dump}"