Development record
rm-rf-root-or-home allows expansions that print nothing beside a root: `rm -rf ${X:-}/`, `${X-}/`, `$HOME${X:-}`, `${A[0]}/`, `${A[@]}/`, and bash 5 `${X^}/` and `${X@P}/` hand rm / or the home, while `${1:-}/` blocks. spellWord read an empty word as no text, and the subscript, case and @ operators returned the value alone.
issueresolvedmajoriss-2609300651133651
rm-rf-root-or-home allows expansions that print nothing beside a root: rm -rf ${X:-}/, ${X-}/, $HOME${X:-}, ${A[0]}/, ${A[@]}/, and bash 5 ${X^}/ and ${X@P}/ hand rm / or the home, while ${1:-}/ blocks. spellWord read an empty word as no text, and the subscript, case and @ operators returned the value alone.
Grounds
- pursued: ${X:-}/, ${X-}/, $HOME${X:-}, ${A[0]}/, ${A[@]}/, ${X^}/ and ${X@P}/ block, while "${files[@]}", "${TMPDIR:-}/abcd-x" and an IFS-named line with ${f:-} stay allowed; the documented residual $X/ (a variable's own empty value) still allows, and 17-guard.md says why.
Frontmatter
| id | iss-2609300651133651 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | major |
.abcd/work/issues/resolved/iss-2609300651133651-rm-rf-root-or-home-allows-expansions.md
open on GitHub ↗ · commit history ↗