<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi All,</p>
<p>I'm thinking that the original name <b><font size="4"
face="monospace">augprint</font></b> is easier to remember and
also seems to describe what the tool is doing, more so than <font
size="4" face="monospace">augsuggest</font></p>
<p>I think I should rename this back to <font face="monospace"><font
size="4">augprint</font> </font>even though it does more than
just the "print" a pathfrom augtool.</p>
<p>If run with <font face="monospace">-v</font> or <font
face="monospace">--verbose <font size="4">augprint</font></font>
(aka augsuggest) will output the corresponding path+value from
the augtool 'print' command, as comments. So there is a strong
correlation with 'print'.</p>
<p>Any thoughts or objections to renaming using <font size="4"
face="monospace">augprint</font> in preference to <font
size="4" face="monospace">augsuggest</font> ?</p>
<p>Regards,</p>
<p>George Hansper<br>
</p>
<div class="moz-cite-prefix">On 17/2/22 20:41, George Hansper wrote:<br>
</div>
<blockquote type="cite"
cite="mid:d971e3ed-aeb8-8f33-3238-9fd23396e62a@hansper.id.au">Hi
All,
<br>
<br>
I have re-written the existing Python program "augprint.py" in C.
<br>
<br>
I've called the new tool "augsuggest", and it is currently
available from:
<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/georgehansper/augsuggest.c">https://github.com/georgehansper/augsuggest.c</a>
<br>
<br>
Like augprint.py, augsuggest creates an augtool script for a given
file.
<br>
<br>
The resulting script is intended to
<br>
<br>
- be able to recreate the original file
<br>
- make no changes if applied to the original file
<br>
- use path-expressions in preference to position-numbers
<br>
<br>
The resulting script requires Augeas version 1.13.0 to work
properly, but the output can still be a useful starting point when
used with earlier versions of Augeas.
<br>
<br>
For example, given a file /etc/hosts with the contents:
<br>
<br>
127.0.0.1 localhost localhost.localdomain localhost4
<br>
<br>
augsuggest will produce the following output:
<br>
<br>
<br>
set /files/etc/hosts/seq::*[ipaddr='127.0.0.1']/ipaddr '127.0.0.1'
<br>
set /files/etc/hosts/seq::*[ipaddr='127.0.0.1']/canonical
'localhost'
<br>
set
/files/etc/hosts/seq::*[ipaddr='127.0.0.1']/alias[.='localhost.localdomain']
'localhost.localdomain'
<br>
set
/files/etc/hosts/seq::*[ipaddr='127.0.0.1']/alias[.='localhost4']
'localhost4'
<br>
<br>
<br>
This output can be used to create idempotent augtool scripts with
little or no further editing when used with Augeas 1.13.0 or
later.
<br>
<br>
For further details, see:
<a class="moz-txt-link-freetext" href="https://github.com/georgehansper/augsuggest.c">https://github.com/georgehansper/augsuggest.c</a>
<br>
<br>
Regards,
<br>
<br>
George Hansper
<br>
<br>
</blockquote>
</body>
</html>