FMT(1plan9)
π FMT(1plan9) π
okay bestie, welcome to fmt and htmlfmt β the manual page for these two little text-formatting icons, straight out of the Plan 9 section 1 manuals. no cap, they're simpler than they look and they ate. π
β¨ NAME β¨
fmt, htmlfmt β simple text formatters π¦
πΈ SYNOPSIS πΈ
fmt [ option ... ] [ file ... ]
htmlfmt [ -a ] [ -c charset ] [ -u url ] [ file ... ]
π DESCRIPTION π
So Fmt literally just copies the files you hand it (or standard input if you give it nothing, which is the default) over to its standard output, filling and indenting lines as it goes. that's the whole vibe. the options are:
-ln β output line length is n, and yes that count includes the indent (default70). β¨-wn β a synonym for-l. same thing, different letter, we love a flexible queen.-in β indent n spaces (default0).-jβ do not join short lines: only fold long lines. like, leave the short ones alone, they're fine.
Empty lines and initial white space in input lines are preserved β respect the original layout, periodt. and empty lines get inserted between input files, so they don't all smoosh together. π«Ά
Fmt is idempotent: it leaves already formatted text unchanged. run it twice, it's giving the same energy. iconic behaviour honestly. π
Htmlfmt performs a similar service, except it accepts as input text formatted with HTML tags. it takes fmt's -l and -w flags, and also:
-aβ normallyhtmlfmtsuppresses the contents of form fields and anchors (URLs and image files); this flag makes it print them instead, in square brackets.[like this]bestie π-ccharset β change the default character set fromiso-8859-1to charset. this is the character set it assumes if there isn't one specified by the html itself in a<meta>directive.-uurl β use url as the base URL for the document when displaying anchors; and heads up, this one sets-a. sneaky little combo move. π
π₯ SOURCE π₯
/src/cmd/fmt.c/src/cmd/htmlfmt
π BUGS π
Htmlfmt makes no attempt to render the two-dimensional geometry of tables; it just treats the table entries as plain, to-be-formatted text. so if you were hoping for a gorgeous grid... nope. not the moment. π
and that's the whole page, bestie β this was FMT(1plan9), from the Plan 9 manual, section 1, and that footer is giving very much "printed by troff, dated whenever the source said so" energy. slay. πβ¨
π¦ where this page comes from
- debian bookworm: 9base 1:6-13 Β· Lucent
- debian trixie: 9base 1:6-14 Β· Lucent
- ubuntu jammy: 9base 1:6-11 Β· Lucent
- ubuntu noble: 9base 1:6-14 Β· Lucent
- ubuntu questing: 9base 1:6-15
- ubuntu resolute: 9base 1:6-15build1 Β· Lucent
- ubuntu stonking: 9base 1:6-15build1 Β· Lucent
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms