PRETTYBAT(1)
π NAME π
okay bestie, gather round β prettybat is here to pretty-print source code and highlight it with bat. that's the whole vibe. β¨
π¦ DESCRIPTION π¦
so likeβ¦ the only thing better than syntax highlighting? syntax highlighting plus code formatting. periodt. π
this script combines the best of both worlds, no cap: it runs various formatters on your source files first, and then hands the glow-up to bat for the highlight. it's giving makeover montage. it's giving main character energy. π₯
πΈ USAGE πΈ
prettybat [OPTIONS] [PATH...]
π OPTIONS π
okay so this is the easy part β every option is passed straight through to bat. that's it. that's the whole thing. π«Ά
- see
man batfor more information π
π LANGUAGES π
here's the roster of what gets formatted by what β iconique lineup honestly π
- JavaScript (JS, JSX) β
prettier - TypeScript (TS, TSX) β
prettier - CSS, SCSS, SASS β
prettier - Markdown β
prettier - JSON β
yq,prettier - YAML β
yq,prettier - HTML β
prettier - SVG β
prettier - Rust β
rustfmt - Bash β
shfmt - C β
ClangFormat - C++ β
ClangFormat - Objective-C β
ClangFormat - Python β
black - Elixir β
mix format
π CAVEATS π
not everything is flawless, bestie, gotta be honest with you π
- The header displayed by
batwill showSTDINinstead of the filename (bat0.13or older). π - The git changes sidebar will not work with files that have been formatted. yeah. it's tragic. β
and that's the whole page, bestie π§π
β this lil masterpiece lives in the General Commands Manual as PRETTYBAT(1), so go forth, format, highlight, and slay. πβ¨ππ¦πΈ
π¦ where this page comes from
- arch rolling: bat-extras 2024.08.24-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms