2019-06-21 23:48:37 +02:00
|
|
|
# bat-extras: prettybat
|
|
|
|
|
2019-06-22 00:51:13 +02:00
|
|
|
A script that uses various pretty-printing tools and bat to display code in your terminal.
|
2019-06-21 23:48:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Command Line
|
|
|
|
|
|
|
|
**Synopsis:**
|
|
|
|
|
|
|
|
- `prettybat [OPTIONS] [PATH...] `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Options:**
|
|
|
|
Every option is passed through to `bat`.
|
|
|
|
See `man bat` for more information.
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-22 00:51:13 +02:00
|
|
|
## Languages
|
|
|
|
|
|
|
|
| Language | Formatter |
|
|
|
|
| -------------------- | ----------------------------------------------- |
|
|
|
|
| JavaScript (JS, JSX) | [prettier](https://prettier.io/) |
|
|
|
|
| TypeScript (TS, TSX) | [prettier](https://prettier.io/) |
|
|
|
|
| CSS, SCSS, SASS | [prettier](https://prettier.io/) |
|
|
|
|
| Markdown | [prettier](https://prettier.io/) |
|
|
|
|
| JSON | [prettier](https://prettier.io/) |
|
|
|
|
| YAML | [prettier](https://prettier.io/) |
|
|
|
|
| HTML | [prettier](https://prettier.io/) |
|
|
|
|
| Rust | [rustfmt](https://github.com/rust-lang/rustfmt) |
|
2019-06-22 01:19:31 +02:00
|
|
|
| Bash | [shfmt](https://github.com/mvdan/sh) |
|
2019-06-22 00:51:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-21 23:48:37 +02:00
|
|
|
## Caveats
|
|
|
|
|
2019-06-22 00:51:13 +02:00
|
|
|
- The header displayed by bat will show `STDIN` instead of the filename.
|
|
|
|
- The git changes sidebar will not work with files that have been formatted.
|
2019-06-21 23:48:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-18 23:15:45 +02:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
This script is a part of the `bat-extras` suite of scripts. You can find install instructions [here](../README.md#installation).
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-21 23:48:37 +02:00
|
|
|
## Issues?
|
|
|
|
|
|
|
|
If you find an issue or have a feature suggestion, make a pull request or issue through GitHub!
|
|
|
|
Contributions are always welcome.
|
|
|
|
|