nftables.nanorc 794 Bytes
Newer Older
1
2
3
4
## Here is an example for nftables.

syntax "nftables" "\.(nft|nftables)$"
header "^#!.*(nft|nftables)"
5
comment "#"
6
7
8
9
10
11
12

# Objects and operations
color green "\<(chain|hook|policy|priority|ruleset|set|table|type|v?map)\>"
color green "\<(define|include)\>"
color red "\<(add|delete|flush|insert|remove|replace)\>"

# Families
13
color yellow "\<(arp|bridge|inet|ingress|ip6?|netdev)\>"
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# Terminal statements
color red "\<(drop|reject)\>"
color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>"

# Comments
color cyan "(^|[[:space:]])#.*$"

# Trailing whitespace
color ,green "[[:space:]]+$"

# Strings and others
color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color green "[{}():;|`$<>!=&\\]" "(\]|\[)"

# Basic variable names
30
color brightred "(\$|@)[[:alpha:]_-][[:alnum:]_.-]*"