]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/crontab.yaml
Merge branch 'diff-gutter' of https://github.com/p-e-w/micro
[micro.git] / runtime / syntax / crontab.yaml
1 filetype: crontab
2
3 detect:
4     filename: "crontab$"
5     header: "^#.*?/etc/crontab"
6
7 rules:
8       #              The time and date fields are:
9       #              field          allowed values
10       #              -----          --------------
11       #              minute         0-59
12       #              hour           0-23
13       #              day of month   0-31
14       #              month          0-12 (or names, see below)
15       #              day of week    0-7 (0 or 7 is Sun, or use names)
16
17     - statement: "^([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+(.*)$\\n?"
18     - constant: "^([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)"
19     
20       # Shell Values
21     - type: "^[A-Z]+\\="
22
23       # Months and weekday keywords
24     - type: "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec"
25     - constant: "sun|mon|tue|wed|thu|fri|sat"
26     - type: "\\@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)"
27
28       # Conditionals
29     - special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|^|!|=|&|\\|)"
30
31     - comment:
32         start: "#"
33         end: "$"
34         rules:
35             - todo: "(TODO|XXX|FIXME):?"
36