Received: (at submit) by bugs.debian.org; 15 Jul 1996 23:51:40 +0000 Received: (qmail-queue invoked from smtpd); 15 Jul 1996 23:31:33 -0000 Received: from artemis.chu.cam.ac.uk (root@131.111.131.1) by master.debian.org with SMTP; 15 Jul 1996 23:31:32 -0000 Received: from chiark.chu.cam.ac.uk ([131.111.131.114]) by artemis.chu.cam.ac.uk with smtp (ident root using rfc1413) id m0ufx6K-0002eGC (Debian /\oo/\ Smail3.1.29.1 #29.37); Tue, 16 Jul 96 00:30 BST Received: by chiark.chu.cam.ac.uk id m0ufx65-0004RCC (Debian /\oo/\ Smail3.1.29.1 #29.35); Tue, 16 Jul 96 00:30 BST Message-Id: Date: Tue, 16 Jul 96 00:30 BST From: Ian Jackson To: Debian bugs submission address Subject: `apropos' matches only word-substrings even in page names Package: man Version: 2.3.10-11 I've been trying to investigate why `man -k pbm', `man -k pnm', `man -k pnm' &c didn't produce the results I'd expected. I have come to the conclusion that the search term presented to apropos is matched against any substring consisting of a whole number of words in the `description', or against the entire page name at once (presumably because the name is always considered an entire word). Observe this in the transcript below. I think it would be much more useful for `man -k alternatives', `man -k pnm', `man -k dpkg' and similar incantations to give pages which contain the search term as any substring of the page name, even if this isn't a whole `word'. After all, if you want matching on the whole page name you can use `whatis' rather than `apropos'. The existing match-words-only behaviour wrt the description is probably useful. I'm (now, after having RTFM) aware that `whatis -w' can be used to do the search I want, with a suitable search term, but I think that `apropos' should do this by default. Thanks, Ian. -chiark:~> whatis dpkg dpkg (8) - a low-level package manager for Debian GNU/Linux -chiark:~> man -k dpkg dpkg (8) - a low-level package manager for Debian GNU/Linux -chiark:~> man -k pkg pkg: nothing appropriate. -chiark:~> man -k dpk dpk: nothing appropriate. -chiark:~> man -k gnu/ gnu/: nothing appropriate. -chiark:~> man -k GNU/ GNU/: nothing appropriate. -chiark:~> man -k 'package manager' dpkg (8) - a low-level package manager for Debian GNU/Linux -chiark:~> man -k Debian dpkg-name (1) - rename Debian packages to full package names start-stop-daemon (8) - Debian package installation tool dchanges (1) - build changes file for a Debian package update-alternatives (8) - Debian package installation tool deb (5) - Debian GNU/Linux binary package format dchanges (5) - debian package changes file deb-control (5) - Debian GNU/Linux packages' master control file format dpkg (8) - a low-level package manager for Debian GNU/Linux dpkg-deb (8) - Debian package archive (.deb) manipulation tool deb-old (5) - Debian GNU/Linux binary package old style format -chiark:~> man -k 'GNU/Linux' deb (5) - Debian GNU/Linux binary package format deb-control (5) - Debian GNU/Linux packages' master control file format dpkg (8) - a low-level package manager for Debian GNU/Linux deb-old (5) - Debian GNU/Linux binary package old style format -chiark:~> man -k packa packa: nothing appropriate. -chiark:~> man -k deb deb (5) - Debian GNU/Linux binary package format dpkg-deb (8) - Debian package archive (.deb) manipulation tool -chiark:~> man -k .deb dpkg-deb (8) - Debian package archive (.deb) manipulation tool -chiark:~> man -k alternatives alternatives: nothing appropriate. -chiark:~> man -k update-alternatives update-alternatives (8) - Debian package installation tool -chiark:~> man -k tool start-stop-daemon (8) - Debian package installation tool update-alternatives (8) - Debian package installation tool installit (1) - file/directory installation tool dpkg-deb (8) - Debian package archive (.deb) manipulation tool -chiark:~>