Bug 25126

Summary: minor nits in whatis(1) command
Product: Documentation Reporter: rdm <rdm>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description rdm 2001-02-16 02:40:01 UTC
	Actually, I'm not sure if this is a doc-bug or a sw-bug;
        it concerns bugs in the documentation support software.

        Anyway, here are the nits:

        *  A comment in apropos.sh contains the misspelled word
           "locailzed"; it should read "localized".

        *  The "test" operator can be a bit dangerous (e.g., if
           a newbie writes a script named "test" and has it call
           "apropos", which calls "test, ...).

        *  In its use as "whatis", apropos formats the first
           line of the output differently than the following
           lines.  Specifically, it leaves out all but one of
           the spaces that precede the dash in the first line.

Fix: 

In /usr/src/gnu/usr.bin/man/apropos/apropos.sh:


          # Check for locailzed manpage subdirectories
          ---
          # Check for localized manpage subdirectories


          if test -z "$line" -a ! -z "$line2"; then
          ---
          if [ -z "$line" -a ! -z "$line2" ]; then


          ( printf -- "$line2"; echo $line; cat ) | $PAGER
          ---
          ( printf -- "$line2"; echo "$line"; cat ) | $PAGER
How-To-Repeat: 
	The last problem listed above can be exercized by

          % whatis whatis
Comment 1 Wolfram Schneider freebsd_committer freebsd_triage 2001-03-30 11:32:23 UTC
State Changed
From-To: open->closed

Patch applied in src/gnu/usr.bin/man/apropos/apropos.sh rev 1.13 
Thanks!