Imported Upstream version 1.3.0
[platform/upstream/augeas.git] / lenses / shells.aug
1 (*
2 Module: Shells
3   Parses /etc/shells
4
5 Author: Raphael Pinson <raphink@gmail.com>
6
7 About: Reference
8   This lens tries to keep as close as possible to `man 5 shells` where possible.
9
10 About: License
11    This file is licenced under the LGPL v2+, like the rest of Augeas.
12
13 About: Lens Usage
14    To be documented
15
16 About: Configuration files
17    This lens applies to /etc/shells. See <filter>.
18 *)
19
20
21 module Shells =
22   autoload xfm
23
24 let empty = Util.empty
25 let comment = Util.comment
26 let comment_or_eol = Util.comment_or_eol
27 let shell = [ seq "shell" . store /[^# \t\n]+/ . comment_or_eol ]
28
29 (* View: lns
30      The shells lens
31 *)
32 let lns = ( empty | comment | shell )*
33
34 (* Variable: filter *)
35 let filter = incl "/etc/shells"
36
37 let xfm = transform lns filter