From 885bb16e22282113bc013037e968a99d11d6b016 Mon Sep 17 00:00:00 2001 From: hubertf Date: Mon, 6 Aug 2007 21:14:36 +0000 Subject: Teach wtf(6) about pkgsrc's help facility: % cd /usr/pkgsrc/audio/qsynth % wtf subst subst: ===> mk/subst.mk: # This Makefile fragment implements a general text replacement facility. ... --- wtf/wtf | 11 ++++++++++- wtf/wtf.6 | 15 ++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'wtf') diff --git a/wtf/wtf b/wtf/wtf index 8fcbaf81..273d482b 100644 --- a/wtf/wtf +++ b/wtf/wtf @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wtf,v 1.14 2007/01/24 13:17:42 hubertf Exp $ +# $NetBSD: wtf,v 1.15 2007/08/06 21:14:36 hubertf Exp $ # # Public domain # @@ -77,6 +77,15 @@ while [ $# -gt 0 ] ; do shift ; continue fi + # Try querying pkgsrc's help facility next + if [ -f ../../mk/bsd.pkg.mk ] ; then + ans=`make help topic="$1"` + if [ $? -eq 0 ] ; then + echo "$1: $ans" + shift ; continue + fi + fi + # Give up! echo "$PROGNAME: I don't know what $1 means!" 1>&2 rv=1 diff --git a/wtf/wtf.6 b/wtf/wtf.6 index db75237e..a60addb8 100644 --- a/wtf/wtf.6 +++ b/wtf/wtf.6 @@ -1,8 +1,8 @@ -.\" $NetBSD: wtf.6,v 1.11 2006/06/17 04:58:14 reed Exp $ +.\" $NetBSD: wtf.6,v 1.12 2007/08/06 21:14:37 hubertf Exp $ .\" .\" Public Domain .\" -.Dd June 22, 2005 +.Dd July 27, 2007 .Dt WTF 6 .Os .Sh NAME @@ -20,11 +20,11 @@ utility displays the expansion of the acronyms specified on the command line. If the acronym is not in any of the acronyms databases, .Nm -will check to see if the acronym is known by the -.Xr whatis 1 -or the -.Xr pkg_info 1 -commands. +will check to see if the acronym is known by +.Xr whatis 1 , +.Xr pkg_info 1 , +or via pkgsrc's internal help mechanism, +.Dq make help topic=XXX . .Pp If .Dq is @@ -58,6 +58,7 @@ default acronym database. computer-related acronym database. .El .Sh SEE ALSO +.Xr make 1 , .Xr pkg_info 1 , .Xr whatis 1 .Sh HISTORY -- cgit v1.2.3