From eaa3e27b1133c2b66eeb6468ebafa050ed0104d6 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 5 Jan 2016 12:44:56 +0000 Subject: Preliminary fixes to make the description of -s easier to understand, and to clarify that fold(1) is intended to count display column positions rather than characters. More work is needed on the code to add UTF-8 support and to fix other POSIX violations, and in that context, further updates to the manual will also be needed. Triggered by a different diff from Michal Mazurek . OK on the wording jmc@, but he didn't check the content. Part of the content verified by guenther@. --- usr.bin/fold/fold.1 | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'usr.bin/fold/fold.1') diff --git a/usr.bin/fold/fold.1 b/usr.bin/fold/fold.1 index 0029e85239e..98d149a595f 100644 --- a/usr.bin/fold/fold.1 +++ b/usr.bin/fold/fold.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fold.1,v 1.16 2011/12/28 22:27:18 schwarze Exp $ +.\" $OpenBSD: fold.1,v 1.17 2016/01/05 12:44:55 schwarze Exp $ .\" $NetBSD: fold.1,v 1.5 1995/09/01 01:42:42 jtc Exp $ .\" .\" Copyright (c) 1980, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)fold.1 8.1 (Berkeley) 6/6/93 .\" -.Dd $Mdocdate: December 28 2011 $ +.Dd $Mdocdate: January 5 2016 $ .Dt FOLD 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Nm is a filter which folds the contents of the specified files, or the standard input if no files are specified, -breaking the lines to have a maximum of 80 characters. +breaking the lines to have a maximum of 80 display columns. .Pp The options are as follows: .Bl -tag -width Ds @@ -54,11 +54,13 @@ Count .Ar width in bytes rather than column positions. .It Fl s -Fold line after the last blank character within the first -.Ar width -column positions (or bytes). +If an output line would be broken after a non-blank character but +contains at least one blank character, break the line earlier, +after the last blank character. +This is useful to avoid line breaks in the middle of words, if +possible. .It Fl w Ar width -Specifies a line width to use instead of the default 80 characters. +Specifies a line width to use instead of the default of 80. .El .Sh EXIT STATUS .Ex -std fold @@ -108,3 +110,5 @@ be expanded using .Xr expand 1 before using .Nm fold . +.Pp +Multibyte character support is missing. -- cgit v1.2.3