xref: /csrg-svn/usr.bin/vis/vis.1 (revision 66926)
166827Sbostic.\" Copyright (c) 1989, 1991, 1993, 1994
262427Sbostic.\"	The Regents of the University of California.  All rights reserved.
341960Smarc.\"
448326Sbostic.\" %sccs.include.redist.roff%
541960Smarc.\"
6*66926Sbostic.\"     @(#)vis.1	8.4 (Berkeley) 04/19/94
741960Smarc.\"
848593Scael.Dd
948593Scael.Dt VIS 1
1058795Scael.Os BSD 4.4
1148593Scael.Sh NAME
1248593Scael.Nm vis
1348593Scael.Nd display non-printable characters in a visual format
1448593Scael.Sh SYNOPSIS
1548593Scael.Nm vis
1648593Scael.Op Fl cbflnostw
1748593Scael.Op Fl F Ar foldwidth
1848593Scael.Op Ar file ...
1948593Scael.Sh DESCRIPTION
2048593Scael.Nm Vis
2148593Scaelis a filter for converting non-printable characters
2248593Scaelinto a visual representation.  It differs from
2348593Scael.Ql cat -v
2448593Scaelin that
2544589Smarcthe form is unique and invertible.  By default, all non-graphic
2644589Smarccharacters except space, tab, and newline are encoded.
2744589SmarcA detailed description of the
2848593Scaelvarious visual formats is given in
2948593Scael.Xr vis 3 .
3048593Scael.Pp
3166827SbosticThe options are as follows:
3248593Scael.Bl -tag -width Ds
3348593Scael.It Fl b
3448593ScaelTurns off prepending of backslash before up-arrow control sequences
3548593Scaeland meta characters, and disables the doubling of backslashes.  This
3648593Scaelproduces output which is neither invertible or precise, but does
3748593Scaelrepresent a minimum of change to the input.  It is similar to
3848593Scael.Dq Li cat -v .
3948593Scael.It Fl c
4041960SmarcRequest a format which displays a small subset of the
4141960Smarcnon-printable characters using C-style backslash sequences.
4248593Scael.It Fl F
4341960SmarcCauses
4448593Scael.Nm vis
4548593Scaelto fold output lines to foldwidth columns (default 80), like
4648593Scael.Xr fold 1 ,
4748593Scaelexcept
4844589Smarcthat a hidden newline sequence is used, (which is removed
4948593Scaelwhen inverting the file back to its original form with
5048593Scael.Xr unvis 1 ) .
5141960SmarcIf the last character in the encoded file does not end in a newline,
5244589Smarca hidden newline sequence is appended to the output.
5344589SmarcThis makes
5466883Sbosticthe output usable with various editors and other utilities which
5544589Smarctypically don't work with partial lines.
5648593Scael.It Fl f
5748593ScaelSame as
5848593Scael.Fl F .
5948593Scael.It Fl l
60*66926SbosticMark newlines with the visible sequence
6148593Scael.Ql \e$ ,
6248593Scaelfollowed by the newline.
6348593Scael.It Fl n
6444589SmarcTurns off any encoding, except for the fact that backslashes are
6548593Scaelstill doubled and hidden newline sequences inserted if
6648593Scael.Fl f
6748593Scaelor
6848593Scael.Fl F
6948593Scaelis selected.  When combined with the
7048593Scael.Fl f
7148593Scaelflag,
7248593Scael.Nm vis
7348593Scaelbecomes like
7448593Scaelan invertible version of the
7548593Scael.Xr fold 1
7648593Scaelutility.  That is, the output
7748593Scaelcan be unfolded by running the output through
7848593Scael.It Fl o
7948593ScaelRequest a format which displays non-printable characters as
8048593Scaelan octal number, \eddd.
8148593Scael.It Fl s
8248593ScaelOnly characters considered unsafe to send to a terminal are encoded.
8348593ScaelThis flag allows backspace, bell, and carriage return in addition
8448593Scaelto the default space, tab and newline.
8548593Scael.Xr unvis 1 .
8648593Scael.It Fl t
8748593ScaelTabs are also encoded.
8848593Scael.It Fl w
8948593ScaelWhite space (space-tab-newline) is also encoded.
9048593Scael.El
9148593Scael.Sh SEE ALSO
9266827Sbostic.Xr unvis 1 ,
9348593Scael.Xr vis 3
9448593Scael.Sh HISTORY
9548593ScaelThe
9648593Scael.Nm
9758795Scaelcommand appears in
9858795Scael.Bx 4.4 .
99