From e04b40811dfd700f7530475b7960d4fb9fda1e2d Mon Sep 17 00:00:00 2001 From: Kai Welke Date: Fri, 21 Aug 2026 08:12:21 +0200 Subject: [PATCH] fix(synonyms): honor --replacements and --corrections when prompting AskSynonym built replacementsProvided from Changed("repalcements"), a flag name that is never registered, so pflag always returned false. Supplying --replacements did not suppress the replacements question for placeholder synonyms. AskAltCorrectionSynonymQuestions also gated the corrections question on replacementsProvided instead of correctionsProvided, so --corrections was ignored too and correctionsProvided was never read. Fixing only the typo would have made --replacements skip the corrections question and fail validation, so both checks are corrected together. Co-Authored-By: Claude Opus 5 (1M context) --- pkg/cmd/shared/handler/synonyms/synonyms.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/shared/handler/synonyms/synonyms.go b/pkg/cmd/shared/handler/synonyms/synonyms.go index f5e8ca81..a474e393 100644 --- a/pkg/cmd/shared/handler/synonyms/synonyms.go +++ b/pkg/cmd/shared/handler/synonyms/synonyms.go @@ -66,7 +66,7 @@ func AskSynonym(flags *shared.SynonymFlags, cmd *cobra.Command) error { wordProvided: cmd.Flags().Changed("word"), placeholderProvided: cmd.Flags().Changed("placeholder"), correctionsProvided: cmd.Flags().Changed("corrections"), - replacementsProvided: cmd.Flags().Changed("repalcements"), + replacementsProvided: cmd.Flags().Changed("replacements"), } err := AskSynonymIDQuestion(flags, flagsProvided) @@ -199,7 +199,7 @@ func AskAltCorrectionSynonymQuestions( } } - if !flagsProvided.replacementsProvided { + if !flagsProvided.correctionsProvided { return ask.AskCommaSeparatedInputQuestion( "corrections (comma separated):", &flags.SynonymCorrections,