diff --git a/AGENTS.md b/AGENTS.md index 594602a..819eb87 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -65,6 +65,7 @@ ff reload # 重载 fish 配置 - macOS:`osxkeychain` → 回退 `store`(`~/.git-credentials`) - Linux:`libsecret` → 回退 `store` - 平台扩展(可选):`git/.gitconfig.darwin` / `.gitconfig.linux` 仅在高版本 Git 下通过 includeIf 加载 +- `help.autocorrect`:主配置为 `0`(兼容旧 Git);Git ≥ 2.36 的平台文件里为 `prompt` ## 边界(不要做的事) diff --git a/git/.gitconfig b/git/.gitconfig index 548f670..3659a65 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -54,7 +54,8 @@ enabled = true autoupdate = true [help] - autocorrect = prompt + # 旧版 Git 仅支持数字(0=仅提示不执行)。Git 2.36+ 见 .gitconfig.darwin / .gitconfig.linux 可改为 prompt + autocorrect = 0 [branch] autoSetupMerge = always sort = -committerdate diff --git a/git/.gitconfig.darwin b/git/.gitconfig.darwin index eaaf0f4..8f2eb03 100644 --- a/git/.gitconfig.darwin +++ b/git/.gitconfig.darwin @@ -1,2 +1,3 @@ -# macOS 专用 Git 配置(可选扩展;凭据见主配置 git-credential.sh) -# 需要 Git 2.36+ 的 includeIf ondarwin 才会加载本文件 +# macOS 专用(需 Git 2.36+ includeIf ondarwin) +[help] + autocorrect = prompt diff --git a/git/.gitconfig.linux b/git/.gitconfig.linux index 19b52f5..a24fa38 100644 --- a/git/.gitconfig.linux +++ b/git/.gitconfig.linux @@ -1,2 +1,3 @@ -# Linux 专用 Git 配置(可选扩展;凭据见主配置 git-credential.sh) -# 需要 Git 2.36+ 的 includeIf onlinux 才会加载本文件 +# Linux 专用(需 Git 2.36+ includeIf onlinux) +[help] + autocorrect = prompt