Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/fortune/fortune Some improvements from jmc@openbsd:



details:   https://anonhg.NetBSD.org/src/rev/dde65ae4b2b5
branches:  trunk
changeset: 569850:dde65ae4b2b5
user:      wiz <wiz%NetBSD.org@localhost>
date:      Thu Sep 09 22:01:08 2004 +0000

description:
Some improvements from jmc@openbsd:
sort option descriptions, add argument to -m, mention strfile
and add some xrefs.

diffstat:

 games/fortune/fortune/fortune.6 |  53 ++++++++++++++++++++++++++--------------
 1 files changed, 34 insertions(+), 19 deletions(-)

diffs (121 lines):

diff -r d340a9e3c0fd -r dde65ae4b2b5 games/fortune/fortune/fortune.6
--- a/games/fortune/fortune/fortune.6   Thu Sep 09 21:39:07 2004 +0000
+++ b/games/fortune/fortune/fortune.6   Thu Sep 09 22:01:08 2004 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: fortune.6,v 1.10 2003/08/07 09:37:13 agc Exp $
+.\"    $NetBSD: fortune.6,v 1.11 2004/09/09 22:01:08 wiz Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"    @(#)fortune.6   8.3 (Berkeley) 4/19/94
 .\"
-.Dd April 19, 1994
+.Dd September 9, 2004
 .Dt FORTUNE 6
 .Os
 .Sh NAME
@@ -66,9 +66,13 @@
 .It Fl f
 Print out the list of files which would be searched, but don't
 print a fortune.
+.It Fl i
+Ignore case for
+.Fl m
+patterns.
 .It Fl l
 Long dictums only.
-.It Fl m
+.It Fl m Ar pattern
 Print out all fortunes which match the regular expression
 .Ar pattern .
 See
@@ -96,10 +100,6 @@
 .Ed
 .It Fl s
 Short apothegms only.
-.It Fl i
-Ignore case for
-.Fl m
-patterns.
 .It Fl w
 Wait before termination for an amount of time calculated from the
 number of characters in the message.
@@ -110,13 +110,14 @@
 The user may specify alternative sayings.
 You can specify a specific file, a directory which contains one or
 more files, or the special word
-.Em all
+.Em all ,
 which says to use all the standard databases.
 Any of these may be preceded by a percentage, which is a number
 .Ar N
 between 0 and 100 inclusive, followed by a
-.Ar % .
-If it is, there will be a
+.Sq %
+character.
+If it is, there will be an
 .Ar N
 percent probability that an adage will be picked from that file
 or directory.
@@ -133,7 +134,7 @@
 .Em funny
 twice as big, saying
 .Bd -literal -offset indent
-fortune funny not-funny
+$ fortune funny not-funny
 .Ed
 .Pp
 will get you fortunes out of
@@ -141,27 +142,41 @@
 two-thirds of the time.
 The command
 .Bd -literal -offset indent
-fortune 90% funny 10% not-funny
+$ fortune 90% funny 10% not-funny
 .Ed
 .Pp
 will pick out 90% of its fortunes from
 .Em funny
-(the ``10% not-funny'' is unnecessary, since 10% is all that's left).
+(the
+.Dq 10%
+is unnecessary, since 10% is all that's left).
 The
 .Fl e
 option says to consider all files equal; thus
 .Bd -literal -offset indent
-fortune -e
+$ fortune -e
 .Ed
 .Pp
 is equivalent to
 .Bd -literal -offset indent
-fortune 50% funny 50% not
-.Em -funny
+$ fortune 50% funny 50% not-funny
 .Ed
+.Pp
+Datafiles for
+.Nm
+are created by the
+.Xr strfile 8
+utility, which is not installed by default,
+The source code for this utility
+can be found in
+.Pa /usr/src/games/fortune/strfile ,
+if it exists.
 .Sh FILES
-.Bl -tag -width Pa -compact
-.It Pa /usr/share/games/fortune
+.Bl -tag -width XX/usr/share/games/fortune/*XX -compact
+.It Pa /usr/share/games/fortune/*
+Fortune files.
 .El
 .Sh SEE ALSO
-.Xr regex 3
+.Xr regex 3 ,
+.Xr random 6 ,
+.Xr rot13 6



Home | Main Index | Thread Index | Old Index