dotextwrap(1)
โจ dotextwrap(1) โ the line-folding filter that speaks every language ๐
okay bestie, sit down, because dotextwrap from the General Commands Manual is about to become your new obsession. it's a manual page, it's a whole vibe, and it's lowkey genius. ๐ฆ
๐ธ NAME ๐ธ
dotextwrap โ a line-folding (text-wrapping) filter program with i18n support. that's it, that's the girl. ๐
โจ SYNOPSIS โจ
dotextwrap [<columns> [<tabs> [<header1> [<header2>]]]]
four optional args, nested like little matryoshka dolls. cute. ๐
๐ DESCRIPTION ๐
so dotextwrap is a small filter whose whole job is wrapping text or folding lines. and when we say text-wrapping, we mean formatting a given text by adding newline characters at proper positions so the text fits the given width (or number of columns) of the terminal. it's giving tailor-made, custom-fitted, measured-to-your-window. โ๏ธโจ
and because it's a filter, it reads from standard input and writes to standard output. no files touched, no mess, we love a low-maintenance icon. ๐ซถ
now here's the part where it devours the other softwares: unlike other softwares, this supports internationalization. not me being dramatic, it's literally true. ๐ญ let's go through the receipts, one by one:
- first โ it automatically detects the current
LC_CTYPElocale and follows it. it just knows. main character energy fr fr. ๐ฎ - second โ it supports multibyte encodings such as
UTF-8andEUC-JP. in multibyte encodings, one character consists from one or more bytes. yes, one whole vibe can be multiple bytes, she contains multitudes. ๐ฆ - third โ it supports fullwidth characters such as CJK Ideogram, Katakana, Hiragana, and Hangul. these characters occupy two columns per one character on the terminal. double the width, double the slay. ๐
- fourth โ it supports combining characters such as Thai and accents for Latin scripts. these characters occupy zero columns per one character on the terminal. zero. invisible. ghost mode. ๐
- fifth โ it supports languages which do not use whitespaces between words. in these languages, lines can be folded at any places with small amount of exception (such as before commas). breaking wherever it wants, with just a tiny bit of manners. iconic behaviour honestly. ๐
๐ SEE ALSO ๐
go read these next, bestie, the lore is deep:
- Manual pages of
textwrap(3) setlocale(3)locale(7)charsets(7)UTF-8(7)
iykyk. ๐๐
๐ AUTHOR ๐
Tomohiro KUBOTA <kubota@debian.org>.
and that's the whole page, no cap. this beauty dropped on 2003-08-24 and it's still living in the General Commands Manual like the legend it is โ dotextwrap(1), forever and always. periodt. ๐๐ธโจ
๐ฆ where this page comes from
- debian bookworm: libtextwrap-dev 0.1-16 ยท BSD-3-Clause
- debian trixie: libtextwrap-dev 0.1-17+b1 ยท BSD-3-Clause
- ubuntu jammy: libtextwrap-dev 0.1-15build1 ยท BSD-3-Clause
- ubuntu noble: libtextwrap-dev 0.1-17build1 ยท BSD-3-Clause
- ubuntu questing: libtextwrap-dev 0.1-17build1
- ubuntu resolute: libtextwrap-dev 0.1-17build2 ยท BSD-3-Clause
- ubuntu stonking: libtextwrap-dev 0.1-17build2 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms