| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| To: | Cygwin List <cygwin AT cygwin DOT com> |
| Subject: | Re: makewhatis -s option can't take >1 parameters |
| References: | <20031209232131 DOT 26096 DOT qmail AT web41403 DOT mail DOT yahoo DOT com> |
| From: | "Dr. Volker Zell" <Dr DOT Volker DOT Zell AT oracle DOT com> |
| In-Reply-To: | <20031209232131.26096.qmail@web41403.mail.yahoo.com> (Matthew |
| Carter's message of "Tue, 9 Dec 2003 15:21:31 -0800 (PST)") | |
| User-Agent: | Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Portable Code, cygwin32) |
| Date: | Wed, 10 Dec 2003 09:36:39 +0100 |
| Message-ID: | <87fzft6pd4.fsf@vzell-de.de.oracle.com> |
| MIME-Version: | 1.0 |
>>>>> "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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |