From 00a903fe4eaddb71e6fc1d66d1c6188dd6c4be98 Mon Sep 17 00:00:00 2001 From: Masamerc Date: Thu, 4 Apr 2024 22:02:24 +0900 Subject: [PATCH 1/2] feat: add '-h' flag for help command --- src/cmd/root.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/root.go b/src/cmd/root.go index 0e32128..14429cb 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -54,6 +54,7 @@ func runProfileSwitcher() error { func shouldRunDirectProfileSwitch() bool { invalidProfiles := []string{"l", "list", "completion", "help", "--help", "v", "version"} + invalidProfiles := []string{"l", "list", "completion", "help", "--help", "-h", "v", "version"} return len(os.Args) > 1 && !utils.Contains(invalidProfiles, os.Args[1]) } From 3be657770325ffa22885768411bca38703713efc Mon Sep 17 00:00:00 2001 From: Masamerc Date: Thu, 4 Apr 2024 22:26:37 +0900 Subject: [PATCH 2/2] fix: remove duplicate line --- src/cmd/root.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cmd/root.go b/src/cmd/root.go index 14429cb..cddcd13 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -53,7 +53,6 @@ func runProfileSwitcher() error { } func shouldRunDirectProfileSwitch() bool { - invalidProfiles := []string{"l", "list", "completion", "help", "--help", "v", "version"} invalidProfiles := []string{"l", "list", "completion", "help", "--help", "-h", "v", "version"} return len(os.Args) > 1 && !utils.Contains(invalidProfiles, os.Args[1]) }