summaryrefslogtreecommitdiffstats
path: root/wtf/wtf
diff options
context:
space:
mode:
authorjmmv <jmmv@NetBSD.org>2003-04-25 19:08:31 +0000
committerjmmv <jmmv@NetBSD.org>2003-04-25 19:08:31 +0000
commit2780a632a7e2f3095f982adc3e7ba7f7a65490e5 (patch)
tree87137350b1691f595287a84061eb7c76aa8eef33 /wtf/wtf
parentd24d9f34316870446a7e6d0990536f2b361b4064 (diff)
downloadbsdgames-darwin-2780a632a7e2f3095f982adc3e7ba7f7a65490e5.tar.gz
bsdgames-darwin-2780a632a7e2f3095f982adc3e7ba7f7a65490e5.tar.zst
bsdgames-darwin-2780a632a7e2f3095f982adc3e7ba7f7a65490e5.zip
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 (limited to 'wtf/wtf')
-rw-r--r--wtf/wtf9
1 files changed, 6 insertions, 3 deletions
diff --git a/wtf/wtf b/wtf/wtf
index 093fc8cb..76bfff08 100644
--- a/wtf/wtf
+++ b/wtf/wtf
@@ -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 @@ while [ $# -gt 0 ]; do
-f)
acronyms=$2; shift
;;
+ -t)
+ acronyms=/usr/share/misc/acronyms.$2; shift
+ ;;
--)
shift; break
;;