Symptom
/read-only on a path that contains square brackets prints No matches found for: and does not add the file. The report shows 'No matches found'. The same path with /add adds the file.
Evidence what you'll see
- The reported command is
/read-only /Volumes/t7ex/Documents/oatnil/ud/ud-next-web/src/app/todolist/[id]/page.tsx. - The matching
/addline in the report ends withAdded src/app/todolist/[id]/page.tsx to the chat.
Why it happens
/read-only used the path as a glob. In a glob, [id] is a character class, meaning one of the characters i or d, not a folder whose name is the four characters [id]. /add did not treat the path that way, so the same file worked there. Pull request #4269 looks for the literal path before it globs: it builds a Path and, when path_obj.exists() is true, uses that path as the only match.
Affected versions
Aider 0.84.0, as the report states. The executable in the report is /Users/lintao/.local/share/uv/tools/aider-chat/bin/python, and the file is on a macOS volume path (/Volumes/...).
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- The file is added, the way
/addalready addedsrc/app/todolist/[id]/page.tsxon0.84.0.
If it still fails
- The linked issue does not give another command. Pull request #4269 is merged. It adds
test_cmd_read_only_with_square_brackets, which creates[id]/page.tsxand calls the command.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it