Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 May 2026 12:09:07 +0000
From:      Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 8acc4c16c663 - main - vis.3: Try to better describe VIS_SAFE
Message-ID:  <69f88c63.37733.7fd2598@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=8acc4c16c6635c3cd8871d0ee1221b62d48d71b9

commit 8acc4c16c6635c3cd8871d0ee1221b62d48d71b9
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-04 12:08: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
---
 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f88c63.37733.7fd2598>