Skip to content

Commit

Permalink
update README for new version
Browse files Browse the repository at this point in the history
Precommit-Verified: a0e39d29a645e6b519d46c87b0784ecba408a9bfe790a3c68c985c01e429ac95
  • Loading branch information
mattlqx committed Mar 24, 2024
1 parent ec6a5f6 commit 2055f8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ By default, a YAML config file is loaded at `.pre-commit-search-and-replace.yaml

The config file name can be changed by passing a `--config PATH` argument to the hook in the pre-commit config. A single search and replacement can be specified with `--search STRING` and `--replacement STRING` arguments as well instead of using a config file.

Other command line args:
- `--[no-]write` - Whether to write replacements to the file.
- `--[no-]color` - Whether to have output be colorized.

Example pre-commit config:

- repo: https://github.com/mattlqx/pre-commit-search-and-replace
rev: v1.0.5
rev: v1.1.0
hooks:
- id: search-and-replace

Expand All @@ -30,6 +34,10 @@ Example search-and-replace config:
replacement: FOOBAR
- search: JustFailIfThisStringIsFound

Output can look something like this:

![example output](doc/example.png)

Specific lines in the committed files may be exempt from consideration by commenting as appropriate to the end of the line:

```
Expand Down
Binary file added doc/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2055f8d

Please sign in to comment.