Skip to content

Commit ecaee46

Browse files
committed
Add features
1 parent eac6cfd commit ecaee46

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ Cli utility for replacing text in files, written in golang and compiled for usag
1010

1111
Inspired by https://github.com/piranha/goreplace
1212

13+
## Features
14+
15+
- Simple search&replace for terms specified as normal shell argument (for escaping only normal shell quotes needed)
16+
- Can use regular expressions for search&replace with and without backrefs (`--regex` and `--regex-backrefs`)
17+
- Supports multiple changesets (search&replace terms)
18+
- Replace the whole line with replacement when line is matching (`--mode=line`)
19+
- ... and add the line at the bottom if there is no match (`--mode=lineinfile`)
20+
- Use [golang template](https://golang.org/pkg/text/template/) with [Sprig template functions]](https://masterminds.github.io/sprig/) (`--mode=template`)
21+
- Can store file as other filename (eg. `go-replace ./configuration.tmpl:./configuration.conf`)
22+
- Can replace files in directory (`--path`) and offers file pattern matching functions (`--path-pattern` and `--path-regex`)
23+
- Can read also stdin for search&replace or template handling
24+
1325
## Usage
1426

1527
```

0 commit comments

Comments
 (0)