[augeas-devel] Files with strange names

David Lutterkort lutter at watzmann.net
Thu Jun 6 16:42:59 UTC 2013


Hi all,

path expressions give us a very powerful way to search the augeas
tree; the downside is that all kinds of characters have special
meanings, characters that might turn up in legitimate filenames like
'!', '[', or '::'

My PR[1] makes sure that Augeas doesn't fall over itself anymore when
files with such names get loaded, but users will still have a hard
time accessing nodes in those files, since they manually need to
escape any special characters.

It would be much more user friendly if there was a simple way to
access such nodes; we should introduce an escape syntax in the pathx
language that makes that easy, something like %p{...} where the stuff
in the braces is interpreted as a glob rather than a path expression.

With that, users could simply write 'match %p{/files/etc/a::b/c!}/*[x
= 'y']/address' to get to nodes in the (strangely named) file
/etc/a::b/c!.

What do others think of this idea ?

David

[1] https://github.com/hercules-team/augeas/pull/21




More information about the augeas-devel mailing list