[augeas-devel] Renaming a node

David Lutterkort dlutter at redhat.com
Thu Jul 24 15:47:05 UTC 2008


On Thu, 2008-07-24 at 09:38 +0200, Raphaël Pinson wrote:
> * Using another name for the node:
> 
> e.g.
>    /files/path/to/my/file/c_field = "value"
> 
>   This also fixes the flag issue, since the field name is different.

Yes, that would probably be the most usable way to do this (maybe prefix
the field name with a '.' or similar)

>  To comment/uncomment here would mean to rename the field, if
> possible. Something that would look like :
> 
>  mv /files/path/to/my/file/c_field /files/path/to/my/file/field
> 
>   I don't know how hard it would be to get to such a possibility in
> Augeas.

It wouldn't be hard at all; the main issue would be to make sure that
you can specify very precisely where the target is in relation to its
siblings.

I am thinking that the best way to achieve that is by allowing the
target of the move to exist; in that case, the target will be deleted
from the tree and the source be moved into its place.

If the target does not exist yet, it is created by appending to the list
of its siblings.

How does that sound ?

David






More information about the augeas-devel mailing list