edit_file
Replace exact text in a file within a WSL distribution, requiring a unique old string unless replace_all is true.
Instructions
Replace exact text in a file. old_string must appear exactly once unless replace_all is true.
path: the file to change. old_string: the exact text to find (copied from read_file output, without line numbers). new_string: the text to put in its place. replace_all: replace every occurrence instead of requiring a single one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| new_string | Yes | ||
| old_string | Yes | ||
| replace_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |