-
Notifications
You must be signed in to change notification settings - Fork 1
/
augeas.txt
33 lines (21 loc) · 1.04 KB
/
augeas.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[ ] is for creating lenses (tree nodes)
del /:\s+/ ": " means that there might be several spaces but we want only one when reconstructing?
file.aug:16.56-.71 exception on line 16, col 56 to 71 (the line is omitted since it remains the same)
let lens is forbidden, use let lns instead
No ~ in filter! Only absolute paths
Don't try to not store
a label doesn't consume text from the concrete view. So if you expect a lens to produce { "<<" = "production" }, you need to use [ key "<<" ... ]
labels are only produced in the abstract view
the tree is composed of nodes
each node can have a label (a), an optional value (b), and optional children (c)
[ key "a" . store "b" . [ key "c" ] ] will parse "abc" as { "a" = "b" { "c" } }
Example:
augtool -I . ls /files/path/to/file.yml/host1/
augtool -I . -At "YAML incl '/home/xxx/bla.yml'" print '/augeas//error'
or
augtool -I . -At "YAML incl '/home/xxx/bla.yml'" errors
note:
if running in non-interactive mode, you won't be able to access the errors as kept in RAM.
Instead:
augtool> your_command
augtool> errors