• she/her

Principal engineer at Mercury. I've authored the Dhall configuration language, the Haskell for all blog, and countless packages and keynote presentations.

I'm a midwife to the hidden beauty in everything.

💖 @wiredaemon


discord
Gabriella439
discord server
discord.gg/XS5ZDZ8nnp
location
bay area
private page
cohost.org/newmoon

posts from @fullmoon tagged #bash

also:

It's basically like a much better version of the fold command for wrapping text:

  • It reflows text that already has line breaks

    … instead of preserving those line breaks like fold does

  • It supports a soft column limit and a hard column limit

    … whereas fold only supports a hard column limit

  • It uses a more intelligent layout algorithm

    It will actually look ahead when deciding where to split text to make paragraphs look less ragged.

  • It preserves indentation!

  • It wraps at word boundaries by default

    … whereas with fold you have to opt into this using -s

Best of all, fmt is widely available! Both fold and fmt are part of the GNU coreutils package, so if you have fold on your system you likely have fmt installed, too.