1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 11:16:16 +02:00

fmt: accept new --goal=WIDTH (-g) option

Accept -g for BSD/Plan9 compatibility.
* NEWS (New features): Mention it.
* tests/fmt/goal-option: New test.
* tests/fmt/long-line: Rename from tests/fmt-long-line.
* tests/fmt/base: Rename from tests/misc/fmt.
* doc/coreutils.texi: Document it.
* src/fmt.c (main): Accept the new option
(check_for_goals): new function to implement the operands
Based on BSD's and Plan-9's fmt programs.
This commit is contained in:
Bruce Korb
2012-04-05 17:13:14 -07:00
committed by Jim Meyering
parent 3d53e7fe1c
commit 0092d5d88b
7 changed files with 99 additions and 10 deletions

View File

@@ -2203,9 +2203,15 @@ between sentences to two spaces.
@opindex -@var{width}
@opindex -w
@opindex --width
Fill output lines up to @var{width} characters (default 75). @command{fmt}
initially tries to make lines about 7% shorter than this, to give it
room to balance line lengths.
Fill output lines up to @var{width} characters (default 75 or @var{goal}
plus 10, if @var{goal} is provided).
@itemx -g @var{goal}
@itemx --goal=@var{goal}
@opindex -g
@opindex --goal
@command{fmt} initially tries to make lines @var{goal} characters wide.
By default, this is 7% shorter than @var{width}.
@item -p @var{prefix}
@itemx --prefix=@var{prefix}