Skip to content

Commit

Permalink
docs(readme): add doc for autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
loichyan committed Mar 28, 2023
1 parent f69fe7a commit e8473a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ The prompt also provides fuzzy matched suggestions when typing the icon name:
You can also use the `search` command to call the prompt directly for fuzzy
search.

### Autofix

`nerdfix` provides some features to autofix obsolete icons:

- The last input is picked if an icon appears twice.
- Use `--replace FROM,TO` to replace the prefix of an icon name with another,
e.g. `nf-mdi-tab` is replaced by `nf-md-tab` when `--replace nf-mdi-,nf-md-`
is specified.

## ⚖️ License

Licensed under either of
Expand Down
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.2","flagWords":[],"language":"en","words":["nerdfix","codepoint","codepoints"]}
{"flagWords":[],"language":"en","words":["nerdfix","codepoint","codepoints","autofix"],"version":"0.2"}
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ pub enum Command {
/// Auto-confirm interactive prompts.
#[arg(short, long)]
yes: bool,
/// Replace the prefix of a icon with another.
/// Replace the prefix of an icon name with another.
///
/// For example, use `--replace nf-mdi,nf-md` to replace all `nf-mdi*` icons
/// For example, use `--replace nf-mdi-,nf-md-` to replace all `nf-mdi*` icons
/// with the same icons in `nf-md*`.
#[arg(short, long, value_name(V_REPLACE))]
replace: Vec<Replace>,
Expand Down

0 comments on commit e8473a8

Please sign in to comment.