mirror of
https://github.com/Alishahryar1/free-claude-code.git
synced 2026-07-03 14:05:26 +02:00
19ce65647e
## What changed This updates `extract_filepaths_from_command()` to skip leading environment variable assignments before detecting the actual command. The same parsing pattern was already used in `extract_command_prefix()`, but filepath extraction still treated the first token as the command even when it was an env assignment. ## Why it matters Commands like `FOO=bar cat README.md` or `DEBUG=1 grep pattern file.txt` were incorrectly classified because `FOO=bar` was treated as the executable name. That caused the optimization path to return an empty `<filepaths>` block instead of the file paths the command actually reads. ## How it was tested Tested the updated logic against env-prefixed read commands such as `FOO=bar cat README.md` and `DEBUG=1 grep needle app.py`. Also verified existing behavior remains unchanged for plain commands like `cat file.txt`, `grep pattern file.txt`, and listing commands like `ls`. Co-authored-by: genoshide <genoshide@users.noreply.github.com>