git: b21f08f97ba0 - stable/15 - vis.3: Try to better describe VIS_SAFE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 May 2026 18:59:19 UTC
The branch stable/15 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=b21f08f97ba0c1e254b55e2ac66ec6853ad281f7
commit b21f08f97ba0c1e254b55e2ac66ec6853ad281f7
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-05-04 12:08:10 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-05-07 18:48:10 +0000
vis.3: Try to better describe VIS_SAFE
The current text fails to draw the reader's attention to the fact that
VIS_SAFE essentially exempts certain characters from being encoded.
While here, fix some markup nits.
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56716
(cherry picked from commit 8acc4c16c6635c3cd8871d0ee1221b62d48d71b9)
---
contrib/libc-vis/vis.3 | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/contrib/libc-vis/vis.3 b/contrib/libc-vis/vis.3
index 18329589d940..9b7b8152be3e 100644
--- a/contrib/libc-vis/vis.3
+++ b/contrib/libc-vis/vis.3
@@ -29,7 +29,7 @@
.\"
.\" @(#)vis.3 8.1 (Berkeley) 6/9/93
.\"
-.Dd April 22, 2017
+.Dd May 3, 2026
.Dt VIS 3
.Os
.Sh NAME
@@ -246,19 +246,22 @@ alter this:
Also encode double quotes
.It Dv VIS_GLOB
Also encode the magic characters
-.Ql ( * ,
+.Po
+.Ql * ,
.Ql \&? ,
.Ql \&[ ,
and
-.Ql # )
+.Ql #
+.Pc
recognized by
.Xr glob 3 .
.It Dv VIS_SHELL
Also encode the meta characters used by shells (in addition to the glob
characters):
-.Ql ( ' ,
+.Po
+.Ql ' ,
.Ql ` ,
-.Ql \&" ,
+.Ql \&\(dq ,
.Ql \&; ,
.Ql & ,
.Ql < ,
@@ -272,7 +275,8 @@ characters):
.Ql \&! ,
.Ql \&^ ,
and
-.Ql ~ ) .
+.Ql ~
+.Pc .
.It Dv VIS_SP
Also encode space.
.It Dv VIS_TAB
@@ -286,13 +290,15 @@ Synonym for
Synonym for
.Dv VIS_WHITE | VIS_GLOB | VIS_SHELL .
.It Dv VIS_SAFE
-Only encode
-.Dq unsafe
-characters.
-Unsafe means control characters which may cause common terminals to perform
-unexpected functions.
-Currently this form allows space, tab, newline, backspace, bell, and
-return \(em in addition to all graphic characters \(em unencoded.
+Leave
+.Dq safe
+characters unencoded.
+Characters are only considered unsafe if they cause common terminals
+to perform unexpected functions.
+Setting the
+.Dv VIS_SAFE
+flag exempts the backspace, bell, and return characters from being
+encoded.
.El
.Pp
(The above flags have no effect for