PRETTYBAT(1)

πŸ“¦ version 2024.08.24, in arch rolling

πŸ’… 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 bat for 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 bat will show STDIN instead of the filename (bat 0.13 or 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