Development record
A bare `cd -x` (an option word neither shell takes, with no operand) leaves the directory unknown in the guard, but zsh 5.9 enters a directory literally named `-x` when one exists (verified 2026-10-11 with cd and pwd only), so a following `bash s.sh` runs the script there unread. An existing test expects the allow; zsh's -N directory-stack words need care.
issueresolvedminoriss-2610111855592575
A bare cd -x (an option word neither shell takes, with no operand) leaves the directory unknown in the guard, but zsh 5.9 enters a directory literally named -x when one exists (verified 2026-10-11 with cd and pwd only), so a following bash s.sh runs the script there unread. An existing test expects the allow; zsh's -N directory-stack words need care.
Frontmatter
| id | iss-2610111855592575 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610111855592575-guard-zsh-cd-dash-word-literal-dir.md
open on GitHub ↗ · commit history ↗