Wrap lines using the Unicode Line Breaking algorithm from UAX #14
npm install @cto.af/linewrap-cliA command-line interface (CLI) for the
@cto.af/linewrap project.
``sh`
npm install -g @cto.af/linewrap-cli
`txt
Usage: linewrap [options] [...file]
Wrap some text, either from file, stdin, or given on the command line. Each
chunk of text is wrapped independently from one another, and streamed to stdout
(or an outFile, if given). Command line arguments with -t/--text are processed
before files.
Arguments:
...file files to wrap and concatenate. Use "-" for
stdin. Default: "-"
Options:
-7,--example7 turn on the extra rules from Example 7 of UAX
#14
-c,--firstCol
was the first line already indented? If NaN,
use the indent width, in graphemes. If
outdentFirst is false, this is ignored Default:
"NaN"
-e,--encoding
always in the default encoding. (choices:
"ascii", "utf8", "utf-8", "utf16le", "ucs2",
"ucs-2", "base64", "base64url", "latin1",
"binary", "hex") Default: "utf8"
--ellipsis
the max width, and in overflow mode "clip"
Default: "…"
-h,--help display help for command
--html escape output for HTML
--hyphen
the max width, and in overflow mode "any"
Default: "-"
-i,--indent
indent that many spaces Default: ""
--indentChar
will be inserted before each line Default: " "
--indentEmpty if the input string is empty, should we still
indent? Default: false
-l,--locale
little effect at the moment
--newline
"\n"
--newlineReplacement
string Default: " "
-o,--outFile
--outdentFirst Do not indent the first output line Default:
false
--overflow