diff options
| author | caner-akca <94343893+caner-akca@users.noreply.github.com> | 2026-09-07 02:27:04 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-07 02:27:04 +0300 |
| commit | 4b5e9bda239a0b6903889062d756424578e94691 (patch) | |
| tree | 95f44b7e4b675683edcc9a093e048ec1c10d656e /distribution | |
| parent | c7b79294e28fe7c835691a25597fabf226ecfc20 (diff) | |
fix: match claude bash permission prompts at every cursor position (#3615)
Claude marks the selected option with "❯", but bash_permission_prompt did not allow that prefix on numbered branches and did not cover the three-option "don't ask again" layout. Match both two- and three-option Bash approval prompts regardless of the selected option.
refs #2650
Diffstat (limited to 'distribution')
| -rw-r--r-- | distribution/agent-detection/claude.toml | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/distribution/agent-detection/claude.toml b/distribution/agent-detection/claude.toml index 2a26a334..16482764 100644 --- a/distribution/agent-detection/claude.toml +++ b/distribution/agent-detection/claude.toml @@ -1,7 +1,7 @@ id = "claude" -version = "2026.08.31.1" +version = "2026.09.04.1" min_engine_version = 2 -updated_at = "2026-08-31T00:00:00Z" +updated_at = "2026-09-04T00:00:00Z" aliases = ["claude-code"] [[rules]] @@ -162,8 +162,20 @@ any = [ { contains = ["tab to amend"] }, { contains = ["ctrl+e to explain"] }, ] +# Claude marks the selected option with "❯", so every option branch has to allow +# that prefix. Numbered branches that omit it only match options the cursor has +# moved away from, which left the resting layout below unmatched here (#2650): +# ❯ 1. Yes / 2. Yes, and don't ask again for: <cmd> / 3. No +# Cover both the two-option and "don't ask again" three-option shapes so this +# rule, not the narrower generic_permission_prompt, claims Bash approvals. all = [ - { any = [{ line_regex = ['(?i)^\s*❯?\s*yes\b'] }, { line_regex = ['(?i)^\s*1\.\s*yes\b'] }, { line_regex = ['(?i)^\s*2\.\s*no\b'] }] }, + { any = [ + { line_regex = ['(?i)^\s*❯?\s*yes\b'] }, + { line_regex = ['(?i)^\s*❯?\s*1\.\s*yes\b'] }, + { line_regex = ['(?i)^\s*❯?\s*2\.\s*yes\b'] }, + { line_regex = ['(?i)^\s*❯?\s*2\.\s*no\b'] }, + { line_regex = ['(?i)^\s*❯?\s*3\.\s*no\b'] }, + ] }, ] [[rules]] |
