-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add 'ln -sf' and 'truncate' to bash write-path extraction patterns #63
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
The bash file extraction utility (src/utils/bash-file-extract.ts) detects file paths written by common bash commands (redirects, cp, mv, rm, touch, etc.). Two common write patterns are missing: ln -sf target link_path (creates/overwrites a symlink) and truncate -s 0 file (empties a file). Adding these patterns would improve the file-change tracking accuracy for sessions where agents use these commands.
Relevant files:
src/utils/bash-file-extract.ts— add new regex patterns to theWRITE_PATTERNSarraytest/— add corresponding test cases (can be in an existing or new test file)
Acceptance criteria:
extractBashWritePaths('ln -sf /usr/bin/node /usr/local/bin/node')returns['/usr/local/bin/node']extractBashWritePaths('truncate -s 0 /var/log/app.log')returns['/var/log/app.log']- At least 4 new test cases covering these patterns (with flags, multiple args, etc.)
npm testpasses
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers