[augeas-devel] Less hacky appending?

Bryan Kearney bkearney at redhat.com
Fri Jan 16 01:48:39 UTC 2009


David Lutterkort wrote:
> 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.
A set ...[new()] would be nice.

-- bk




More information about the augeas-devel mailing list