|
From: | Charlie Kester |
Subject: | Re: [Groff] Parsing specific section of man page |
Date: | Tue, 24 Jan 2012 17:24:36 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 |
On 01/23/2012 08:42 PM, James K. Lowden wrote:
The problem can be broken into two parts: the creation of semantic information from man pages, and the use of that semantic information by your shell. Suppose you used, say, unroff to populate a database of commands and their options, and wrote two utilities: one to update that database both as the man pages were updated (perhaps using cron), and another to accept manual overrides for man pages not amenable to semantic extraction. Now you have a user-extensible system, and your shell doesn't know about or care about man/mdoc/whatever.
The most "Unix-y" solution would be to use a text file or files for the "database", so that users can edit it with whatever tool they prefer.
If needed for performance reasons, you could follow terminfo's example and compile the database into a binary form.
Text files would also make it easy for other developers to write tools to work with the database. Someone's bound to come up with ways to use this info that you never imagined.
[Prev in Thread] | Current Thread | [Next in Thread] |