mirror of
https://github.com/crate-ci/typos.git
synced 2025-01-12 01:31:26 -05:00
docs(readme): Use console code blocks
This commit is contained in:
parent
97898e1459
commit
153dc19309
1 changed files with 24 additions and 24 deletions
48
README.md
48
README.md
|
@ -40,18 +40,18 @@ Dual-licensed under [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE)
|
||||||
(installable via [gh-install](https://github.com/crate-ci/gh-install)).
|
(installable via [gh-install](https://github.com/crate-ci/gh-install)).
|
||||||
|
|
||||||
Or use rust to install:
|
Or use rust to install:
|
||||||
```bash
|
```console
|
||||||
cargo install typos-cli
|
$ cargo install typos-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use [Homebrew](https://brew.sh/) to install:
|
Or use [Homebrew](https://brew.sh/) to install:
|
||||||
```bash
|
```console
|
||||||
brew install typos-cli
|
$ brew install typos-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use [Conda](https://conda.io/) to install:
|
Or use [Conda](https://conda.io/) to install:
|
||||||
```bash
|
```console
|
||||||
conda install typos
|
$ conda install typos
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use [Pacman](https://wiki.archlinux.org/title/pacman) to install:
|
Or use [Pacman](https://wiki.archlinux.org/title/pacman) to install:
|
||||||
|
@ -62,14 +62,14 @@ sudo pacman -S typos
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Most commonly, you'll either want to see what typos are available with
|
Most commonly, you'll either want to see what typos are available with
|
||||||
```bash
|
```console
|
||||||
typos
|
$ typos
|
||||||
```
|
```
|
||||||
|
|
||||||
Or have them fixed
|
Or have them fixed
|
||||||
```bash
|
```console
|
||||||
typos --write-changes
|
$ typos --write-changes
|
||||||
typos -w
|
$ typos -w
|
||||||
```
|
```
|
||||||
If there is any ambiguity (multiple possible corrections), `typos` will just report it to the user and move on.
|
If there is any ambiguity (multiple possible corrections), `typos` will just report it to the user and move on.
|
||||||
|
|
||||||
|
@ -124,27 +124,27 @@ extend-exclude = ["localized/*.po"]
|
||||||
- `--format json` to get jsonlines with exit code 0 on no errors, code 2 on typos, anything else is an error.
|
- `--format json` to get jsonlines with exit code 0 on no errors, code 2 on typos, anything else is an error.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
```bash
|
```console
|
||||||
# Read file from stdin, write corrected version to stdout
|
$ # Read file from stdin, write corrected version to stdout
|
||||||
typos - --write-changes
|
$ typos - --write-changes
|
||||||
# Creates a diff of what would change
|
$ # Creates a diff of what would change
|
||||||
typos dir/file --diff
|
$ typos dir/file --diff
|
||||||
# Fully programmatic control
|
$ # Fully programmatic control
|
||||||
typos dir/file --format json
|
$ typos dir/file --format json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Debugging
|
### Debugging
|
||||||
|
|
||||||
You can see what the effective config looks like by running
|
You can see what the effective config looks like by running
|
||||||
```bash
|
```console
|
||||||
typos --dump-config -
|
$ typos --dump-config -
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then see how typos is processing your project with
|
You can then see how typos is processing your project with
|
||||||
```bash
|
```console
|
||||||
typos --files
|
$ typos --files
|
||||||
typos --identifiers
|
$ typos --identifiers
|
||||||
typos --words
|
$ typos --words
|
||||||
```
|
```
|
||||||
|
|
||||||
If you need to dig in more, you can enable debug logging with `-v`
|
If you need to dig in more, you can enable debug logging with `-v`
|
||||||
|
|
Loading…
Reference in a new issue