makewhatis -s option can't take >1 parameters
Dr. Volker Zell
Dr.Volker.Zell@oracle.com
Wed Dec 10 09:38:00 GMT 2003
>>>>> "Matthew" == Matthew Carter writes:
Matthew> I found that the "-s" option to makewhatis cannot take
Matthew> multiple sections. If you try to supply multiple
Matthew> sections, they are incorrectly interpreted as a
Matthew> manpath.
Matthew> For example:
Matthew> % makewhatis -s '1 2'
Matthew> No such directory 2
Matthew> You might wonder why anyone would ever want to use
Matthew> "-s". (A comment in the code says that it might be
Matthew> obsoleted soon.) I need to use "-s" because section
Matthew> 8c, containing imapd, is not supplied in the default
Matthew> section list. However, if I use "makewhatis -s 8c"
Check out the test version of man (man-1.5k.1) which has 8c in the section list.
Matthew> alone, the whatis database loses information about all
Matthew> the other sections. I need to be able to run
Matthew> "makewhatis -s '1 2 3 4 5 6 7 8 9 n l 8c'".
Matthew> I looked into the source, and determined that there is
Matthew> a simple fix. The problem is caused by the use of $*
Matthew> in a 'for' loop to reference the command-line
Matthew> arguments. This causes any argument that contains
Matthew> multiple words to become multiple arguments. The "$@"
Matthew> construct is specifically designed to work around
Matthew> this: bash expands "$@" to a quoted word for every
Matthew> argument.
Matthew> Thus, changing line 71 from:
Matthew> for name in $*
Matthew> to:
Matthew> for name in "$@"
Matthew> solves the problem.
I will consider this in the next version of man.
Matthew> I hope this is helpful.
Yes, thanks
Matthew> -Matt Carter
Ciao
Volker
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list