This lens tries to keep as close as possible to `man 5 aliases` where possible.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This lens applies to /etc/aliases.
The Test_Aliases file contains various examples and tests.
| let word = /[^|", \t\n]+/|
| let name = /([^ \t\n#:|@]+|"[^"|\n]*")/ (* " make emacs calm down *)
| let command = /(\|([^", \t\n]+|"[^"\n]+"))|("\|[^"\n]+")/
a command can contain spaces, if enclosed in double quotes, the case without spaces is taken care with word
| let comment = Util.comment|
| let colon = del /[ \t]*:[ \t]*/ ":\t"|
Separation between the alias and it’s destinations
| let comma = del /[ \t]*,[ \t]*(\n[ \t]+)?/ ", "
Separation between multiple destinations
| let destination = ( word | command )
Can be either a word (no spaces included) or a command with spaces
| let value_list = Build.opt_list ([ label "value" . store destination]) comma
List of destinations
| let alias = [ seq "alias" .
[ label "name" . store name ] . colon .
] . eol
a name with one or more destinations
| let lns = (comment | empty | alias)*