The first diff explains what happens to a word longer than 'width'. This
diff comes from NetBSD and FreeBSD. The explanation is quite
complicated and I couldn't understand what this flag does at first, the
source code makes it much clearer (the variable is called split_words).
But I didn't change the wording, maybe it's just me.

The second diff comes from me, and documents a different way to specify width.

The third diff comes from FreeBSD, and makes wording a bit more precise.

Index: fold.1
===================================================================
RCS file: /cvs/src/usr.bin/fold/fold.1,v
retrieving revision 1.16
diff -u -p -r1.16 fold.1
--- fold.1      28 Dec 2011 22:27:18 -0000      1.16
+++ fold.1      4 Jan 2016 19:13:47 -0000
@@ -57,6 +57,8 @@ in bytes rather than column positions.
 Fold line after the last blank character within the first
 .Ar width
 column positions (or bytes).
+If a blank character does not exist within the width, then
+a longer line will still be split at the width.
 .It Fl w Ar width
 Specifies a line width to use instead of the default 80 characters.
 .El



Index: fold.1
===================================================================
RCS file: /cvs/src/usr.bin/fold/fold.1,v
retrieving revision 1.16
diff -u -p -r1.16 fold.1
--- fold.1      28 Dec 2011 22:27:18 -0000      1.16
+++ fold.1      4 Jan 2016 19:12:53 -0000
@@ -39,7 +39,10 @@
 .Sh SYNOPSIS
 .Nm fold
 .Op Fl bs
-.Op Fl w Ar width
+.Oo
+.Fl w Ar width |
+.Fl Ns Ar width
+.Oc
 .Op Ar
 .Sh DESCRIPTION
 .Nm
@@ -57,7 +60,7 @@ in bytes rather than column positions.
 Fold line after the last blank character within the first
 .Ar width
 column positions (or bytes).
-.It Fl w Ar width
+.It Fl w Ar width | Fl Ns Ar width
 Specifies a line width to use instead of the default 80 characters.
 .El
 .Sh EXIT STATUS



Index: fold.1
===================================================================
RCS file: /cvs/src/usr.bin/fold/fold.1,v
retrieving revision 1.16
diff -u -p -r1.16 fold.1
--- fold.1      28 Dec 2011 22:27:18 -0000      1.16
+++ fold.1      4 Jan 2016 19:25:18 -0000
@@ -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 columns.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds
@@ -58,7 +58,7 @@ Fold line after the last blank character
 .Ar width
 column positions (or bytes).
 .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 80 columns.
 .El
 .Sh EXIT STATUS
 .Ex -std fold

-- 
Michal Mazurek

Reply via email to