Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/wtf Implement a -t option, to easily select an acronym...
details: https://anonhg.NetBSD.org/src/rev/38cc2912e615
branches: trunk
changeset: 546308:38cc2912e615
user: jmmv <jmmv%NetBSD.org@localhost>
date: Fri Apr 25 19:08:31 2003 +0000
description:
Implement a -t option, to easily select an acronyms list from /usr/share/misc.
One can do `wtf -t comp pci' and it will use /usr/share/misc/acronyms.comp
to search the acronym as usual.
diffstat:
games/wtf/wtf | 9 ++++++---
games/wtf/wtf.6 | 12 ++++++++++--
2 files changed, 16 insertions(+), 5 deletions(-)
diffs (71 lines):
diff -r e54e3f9cd01d -r 38cc2912e615 games/wtf/wtf
--- a/games/wtf/wtf Fri Apr 25 18:57:18 2003 +0000
+++ b/games/wtf/wtf Fri Apr 25 19:08:31 2003 +0000
@@ -1,18 +1,18 @@
#!/bin/sh
#
-# $NetBSD: wtf,v 1.10 2003/04/10 09:21:19 jmmv Exp $
+# $NetBSD: wtf,v 1.11 2003/04/25 19:08:31 jmmv Exp $
#
# Public domain
#
usage() {
- echo "usage: `basename $0` [-f dbfile] [is] <acronym>"
+ echo "usage: `basename $0` [-f dbfile] [-t type] [is] <acronym>"
exit 1
}
acronyms=${ACRONYMDB:-/usr/share/misc/acronyms}
-args=`getopt f: $*`
+args=`getopt f:t: $*`
if [ $? -ne 0 ]; then
usage
fi
@@ -22,6 +22,9 @@
-f)
acronyms=$2; shift
;;
+ -t)
+ acronyms=/usr/share/misc/acronyms.$2; shift
+ ;;
--)
shift; break
;;
diff -r e54e3f9cd01d -r 38cc2912e615 games/wtf/wtf.6
--- a/games/wtf/wtf.6 Fri Apr 25 18:57:18 2003 +0000
+++ b/games/wtf/wtf.6 Fri Apr 25 19:08:31 2003 +0000
@@ -1,8 +1,8 @@
-.\" $NetBSD: wtf.6,v 1.7 2003/04/11 11:13:34 jmmv Exp $
+.\" $NetBSD: wtf.6,v 1.8 2003/04/25 19:08:31 jmmv Exp $
.\"
.\" Public Domain
.\"
-.Dd April 11, 2003
+.Dd April 25, 2003
.Dt WTF 6
.Os
.Sh NAME
@@ -11,6 +11,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl f Ar dbfile
+.Op Fl t Ar type
.Op Ar is
.Ar acronym Ar ...
.Sh DESCRIPTION
@@ -37,6 +38,13 @@
Overrides the default acronym database, bypassing the value of the
.Ev ACRONYMDB
variable.
+.It Fl t Ar type
+Specifies the acronym's type.
+Simply put, it makes the program use the acronyms database named
+.Pa /usr/share/misc/acronyms.type ,
+where
+.Ar type
+is given by the argument.
.El
.Sh ENVIRONMENT
.Bl -tag -width ACRONYMDB
Home |
Main Index |
Thread Index |
Old Index