xref: /netbsd-src/usr.bin/ul/ul.1 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\"	$NetBSD: ul.1,v 1.12 2016/06/24 12:03:22 abhinav Exp $
2.\"
3.\" Copyright (c) 1980, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"     @(#)ul.1	8.1 (Berkeley) 6/6/93
31.\"
32.Dd June 23, 2016
33.Dt UL 1
34.Os
35.Sh NAME
36.Nm ul
37.Nd do underlining
38.Sh SYNOPSIS
39.Nm
40.Op Fl i
41.Op Fl t Ar terminal
42.Op Ar name Ar ...
43.Sh DESCRIPTION
44.Nm
45reads the named files (or standard input if none are given)
46and translates occurrences of underscores to the sequence
47which indicates underlining for the terminal in use, as specified
48by the environment variable
49.Ev TERM .
50The file
51.Pa /usr/share/misc/terminfo
52is read to determine the appropriate sequences for underlining.
53If the terminal is incapable of underlining, but is capable of
54a standout mode then that is used instead.
55If the terminal can overstrike,
56or handles underlining automatically,
57.Nm
58degenerates to
59.Xr cat 1 .
60If the terminal cannot underline, underlining is ignored.
61.Pp
62The following options are available:
63.Bl -tag -width Ds
64.It Fl i
65Underlining is indicated by a separate line containing appropriate
66dashes `\-'; this is useful when you want to look at the underlining
67which is present in an
68.Xr nroff 1
69output stream on a crt-terminal.
70.It Fl t Ar terminal
71Overrides the terminal type specified in the environment with
72.Ar terminal .
73.El
74.Sh ENVIRONMENT
75The following environment variable is used:
76.Bl -tag -width TERM
77.It Ev TERM
78The
79.Ev TERM
80variable is used to relate a tty device
81with its device capability description (see
82.Xr terminfo 5 ) .
83.Ev TERM
84is set at login time, either by the default terminal type
85specified in
86.Pa /etc/ttys
87or as set during the login process by the user in their
88.Pa login
89file (see for example
90.Xr csh 1 Ns 's Ic setenv ) .
91.El
92.Sh FILES
93.Bl -tag -width /usr/share/misc/terminfo -compact
94.It Pa /usr/share/misc/terminfo
95File containing terminal descriptions.
96.El
97.Sh SEE ALSO
98.Xr colcrt 1 ,
99.Xr man 1 ,
100.Xr nroff 1 ,
101.Xr terminfo 3 ,
102.Xr terminfo 5
103.Sh HISTORY
104The
105.Nm
106command appeared in
107.Bx 3.0 .
108.Sh BUGS
109.Xr nroff 1
110usually outputs a series of backspaces and underlines intermixed
111with the text to indicate underlining.  No attempt is made to optimize
112the backward motion.
113