permissions: Bash(rm -r:*) does not match rm -rf

Resolved 💬 2 comments Opened Feb 26, 2026 by bradyz Closed Mar 26, 2026

Bug

Bash(rm -r:*) in the ask permission list does not match rm -rf.

The user expects rm -r to be a prefix match that catches all variants (rm -rf, rm -ri, etc.), but in practice only the literal rm -r triggers the prompt. rm -rf passes through silently.

Repro

  1. Add "Bash(rm -r:*)" to ask in ~/.claude/settings.json
  2. Ask Claude to rm -r test.txt → prompts (correct)
  3. Ask Claude to rm -rf test.txt → no prompt (incorrect)

Expected

Bash(rm -r:*) should match any command starting with rm -r, including rm -rf, rm -ri, etc. — or the docs should clarify that each flag combo needs its own entry.

Environment

  • Claude Code (VS Code extension)
  • Windows / MSYS2 bash
  • 2026-02-25

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗