This is the mail archive of the
mailing list for the Cygwin project.
Re: makewhatis -s option can't take >1 parameters
- From: "Dr. Volker Zell" <Dr dot Volker dot Zell at oracle dot com>
- To: Cygwin List <cygwin at cygwin dot com>
- Date: Wed, 10 Dec 2003 09:36:39 +0100
- Subject: Re: makewhatis -s option can't take >1 parameters
- References: <email@example.com>
>>>>> "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> 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> Thus, changing line 71 from:
Matthew> for name in $*
Matthew> for name in "$@"
Matthew> solves the problem.
I will consider this in the next version of man.
Matthew> I hope this is helpful.
Matthew> -Matt Carter
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html