[augeas-devel] Augeas and contextual help

Raphaël Pinson raphink at gmail.com
Wed Nov 17 21:42:37 UTC 2010


Hi guys,

I would like to mention and discuss a subject I've been talking about with
Francis quite a bit lately and I think matters. Augeas has the potential to
improve greatly the way people deal with config files.

Now what makes it hard for them currently to use Augeas? It's still hard
right now to understand how files are mapped into the tree. By that I mean
that you may well know what the config file looks like and have no idea what
the tree representation will be, and the two best ways to find out about it
currently are to either use augtool on a big config file to see how it gets
mapped, or go read the lens code, which most people won't do.

Is there a way we could make it easier for end users to find their way
through the Augeas tree? I've been thinking for quite some time about a
contextual help, and Francis' patch adding the aug_info call triggered this
in my mind again.


I see at least two ways of providing such help. One way would provide help
on a node level. Using augtool, a user would type something like:

   $ info /files/etc/passwd/root/password

and get a description of this node. The description would include:

  - the lens name (in that case Passwd) ;
  - the regexp for the node label (in that case "password", as described in
passwd.aug line 33)
  - the regexp for the node value (in that case Passwd.word, i.e.
/[A-Za-z0-9_.-]+/)

The aug_info call might also be used on a variable, such as:

  $ info Passwd.word

if I wanted to get more info on that variable.


Another way to provide contextual help, probably easier to implement, would
be to do it on a lens level, adding a kind of manpage in the lens
description. Then, calling:

  $ info files/etc/passwd/root/password

would return the "manpage" for the Passwd lens, as written by the lens
author in the passwd.aug file or another file (it could actually be passwd.1
in NROFF).


What is your opinion on this? Do you have other ideas or suggestions?


Raphaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20101117/2b04e77a/attachment.htm>


More information about the augeas-devel mailing list