NetBSD-5.0.2/dist/atf/tools/atf-format.1

Compare this file to the similar file:
Show the results in this format:

.\"
.\" Automated Testing Framework (atf)
.\"
.\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 18, 2007
.Dt ATF-FORMAT 1
.Os
.Sh NAME
.Nm atf-format
.Nd formats a text paragraph to fit nicely on screen
.Sh SYNOPSIS
.Nm
.Op Ar str1 Op Ar .. strN
.Nm
.Fl t Ar tag
.Op Fl l Ar length
.Op Fl r
.Op Ar str1 Op Ar .. strN
.Nm
.Fl h
.Sh DESCRIPTION
.Nm
formats text messages to not overflow the terminal's width, and optionally
adds a prefix string to them.
Messages can be fed through the standard input or through multiple
arguments; in the latter case, all of them are concatenated as if they were
separated by a single space.
Different lines (those separated by a new-line character) are treated as
different paragraphs and thus formatted accordingly.
.Pp
In the first synopsis form,
.Nm
formats the message to not overflow the terminal's width.
The message is supposed to start at column 0.
.Pp
In the second synopsis form,
.Nm
also formats the message to not overflow the terminal's width, but it
appends a tag to the beginning of the string.
This tag may or may be not repeated on each line of the text; if it is
not repeated, the text is simply indented.
This synopsis form is useful to easily format two-column tables, being the
first one much shorter than the second one.
The message is supposed to start at column 0.
.Pp
In the third synopsis form,
.Nm
will print information about all supported options and their purpose.
.Pp
The following options are available:
.Bl -tag -width XlXlengthXX
.It Fl h
Shows a short summary of all available options and their purpose.
.It Fl l Ar length
Specifies the length in characters of te tag.
Useful if the tag is shorter than the desired length, which happens when
formatting two-column tables.
.It Fl r
Repeat the tag on each line.
Otherwise it is only shown on the first one, and all others are indented
appropriately using whitespace.
.It Fl t Ar tag
Specifies the tag to use
.El
.Sh SEE ALSO
.Xr atf 7