[augeas-devel] Less hacky appending?

David Lutterkort lutter at redhat.com
Thu Jan 15 23:52:54 UTC 2009


On Thu, 2009-01-15 at 14:47 -0800, Robin Lee Powell wrote:
> Something someone mentioned on the Puppet list: the whole
> really-large-number-to-append thing is pretty weak.  It appears that
> 
>     set .../foo[last()+1] bar
> 
> doesn't work.  Could we get a new() or last_plus_one() or something?

It's possible to do that with something like

        augtool> ins dir after /files/etc/exports/dir[last()]
        augtool> set /files/etc/exports/dir[last()]/client foo
        
Sticking it into the path expressions with a new() or similar function
would be a little trickier ... I have to think about how you could do
that.

David





More information about the augeas-devel mailing list