xref: /csrg-svn/usr.bin/vis/vis.1 (revision 62427)
1*62427Sbostic.\" Copyright (c) 1989, 1991, 1993
2*62427Sbostic.\"	The Regents of the University of California.  All rights reserved.
341960Smarc.\"
448326Sbostic.\" %sccs.include.redist.roff%
541960Smarc.\"
6*62427Sbostic.\"     @(#)vis.1	8.1 (Berkeley) 06/06/93
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
3148593ScaelOptions supported by
3248593Scael.Nm vis :
3348593Scael.Bl -tag -width Ds
3448593Scael.It Fl b
3548593ScaelTurns off prepending of backslash before up-arrow control sequences
3648593Scaeland meta characters, and disables the doubling of backslashes.  This
3748593Scaelproduces output which is neither invertible or precise, but does
3848593Scaelrepresent a minimum of change to the input.  It is similar to
3948593Scael.Dq Li cat -v .
4048593Scael.It Fl c
4141960SmarcRequest a format which displays a small subset of the
4241960Smarcnon-printable characters using C-style backslash sequences.
4348593Scael.It Fl F
4441960SmarcCauses
4548593Scael.Nm vis
4648593Scaelto fold output lines to foldwidth columns (default 80), like
4748593Scael.Xr fold 1 ,
4848593Scaelexcept
4944589Smarcthat a hidden newline sequence is used, (which is removed
5048593Scaelwhen inverting the file back to its original form with
5148593Scael.Xr unvis 1 ) .
5241960SmarcIf the last character in the encoded file does not end in a newline,
5344589Smarca hidden newline sequence is appended to the output.
5444589SmarcThis makes
5544589Smarcthe output usuable with various editors and other utilities which
5644589Smarctypically don't work with partial lines.
5748593Scael.It Fl f
5848593ScaelSame as
5948593Scael.Fl F .
6048593Scael.It Fl l
6148593ScaelMark newlines with the visable sequence
6248593Scael.Ql \e$ ,
6348593Scaelfollowed by the newline.
6448593Scael.It Fl n
6544589SmarcTurns off any encoding, except for the fact that backslashes are
6648593Scaelstill doubled and hidden newline sequences inserted if
6748593Scael.Fl f
6848593Scaelor
6948593Scael.Fl F
7048593Scaelis selected.  When combined with the
7148593Scael.Fl f
7248593Scaelflag,
7348593Scael.Nm vis
7448593Scaelbecomes like
7548593Scaelan invertible version of the
7648593Scael.Xr fold 1
7748593Scaelutility.  That is, the output
7848593Scaelcan be unfolded by running the output through
7948593Scael.It Fl o
8048593ScaelRequest a format which displays non-printable characters as
8148593Scaelan octal number, \eddd.
8248593Scael.It Fl s
8348593ScaelOnly characters considered unsafe to send to a terminal are encoded.
8448593ScaelThis flag allows backspace, bell, and carriage return in addition
8548593Scaelto the default space, tab and newline.
8648593Scael.Xr unvis 1 .
8748593Scael.It Fl t
8848593ScaelTabs are also encoded.
8948593Scael.It Fl w
9048593ScaelWhite space (space-tab-newline) is also encoded.
9148593Scael.El
9248593Scael.Sh SEE ALSO
9348593Scael.Xr unvis 1
9448593Scael.Xr vis 3
9548593Scael.Sh HISTORY
9648593ScaelThe
9748593Scael.Nm
9858795Scaelcommand appears in
9958795Scael.Bx 4.4 .
100