{"version":"2.1.330","anchor":"rm-with-variable-path-and-glob-gets-an-extra-warning","canonical_anchor":"rm-with-variable-path-and-glob-gets-an-extra-warning","heading":"Extra warning for rm -r on a variable path ending in a wildcard","tier":"notice","area":"Bash Safety","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/rm-with-variable-path-and-glob-gets-an-extra-warning","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### Extra warning for `rm -r` on a variable path ending in a wildcard\n\nClaude Code now warns that `rm -r $VAR\/*` can remove everything if the variable is empty, and flags commands whose folder changes it can't follow\n\n**What**\n\nClaude Code checks shell commands for risky deletions before running them. For `rm -r`, the recursive delete command, a target shaped like `$VAR\/*` now gets an extra note: it can remove everything if the variable is empty. An empty variable turns the target into `\/*`, which means every file from the top of the drive.\n\nThere is also a new message saying Claude Code can't follow the directory changes in this command. Separately, the way Claude Code handles shell variables in commands now depends on a new switch from Anthropic's server, which stays off unless it is switched on remotely.\n\n**Why**\n\nAn empty variable can turn an ordinary cleanup command into one that deletes far more than intended. The warning makes that risk visible before you approve the command.\n\n- Area: Bash Safety\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}