diff --git a/CHANGELOG b/CHANGELOG index 84f4872caa..15833a80c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ git-annex (10.20250116) UNRELEASED; urgency=medium - * Support help.autocorrect=prompt. + * Support help.autocorrect settings "prompt", "never", and "immediate". -- Joey Hess Mon, 20 Jan 2025 10:24:51 -0400 diff --git a/Git/AutoCorrect.hs b/Git/AutoCorrect.hs index 111cec4b66..5a62a93075 100644 --- a/Git/AutoCorrect.hs +++ b/Git/AutoCorrect.hs @@ -55,6 +55,8 @@ prepare cmdname input showmatch matches r = | otherwise -> sleep n Nothing -> case getcfg <$> r of Just "prompt" -> prompt + Just "never" -> unknowncommand + Just "immediate" -> warn Nothing _ -> list where getcfg = fromConfigValue . Git.Config.get "help.autocorrect" "0" @@ -89,3 +91,5 @@ prepare cmdname input showmatch matches r = resp <- headMaybe . map toLower <$> getLine when (resp /= Just 'y') $ exitWith (ExitFailure 1) + + unknowncommand = giveup $ "Unknown command '" ++ input ++ "'"