Skip to content

Commit e96ccc7

Browse files
SannidhyaSannidhya
authored andcommitted
fix: edit-file.md When is it used section — align with single-match semantics
Address review comment: 'When is it used?' still described global replacement use cases (throughout a file, all instances) contradicting the updated single-match behavior. Rewrote to describe targeted, unique-location changes.
1 parent a3347d0 commit e96ccc7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

docs/advanced-usage/available-tools/edit-file.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ This tool searches for an exact string in a file and replaces **exactly one** oc
3434

3535
## When is it used?
3636

37-
- When renaming variables, functions, or identifiers throughout a file
38-
- When updating repeated string literals or configuration values
39-
- When fixing consistent typos or outdated terminology
40-
- When replacing all instances of a deprecated API or import path
37+
- When making a targeted change to a specific, uniquely identifiable location in a file
38+
- When updating a specific string literal or configuration value at a known location
39+
- When fixing a specific instance of a typo or outdated terminology
40+
- When replacing a uniquely-identified occurrence of a deprecated API or import path
41+
- When creating a new file or appending content to an existing file (`old_string=""`)
4142
- When you need to ensure exact match replacement without fuzzy logic
4243

4344
---

0 commit comments

Comments
 (0)