nftables.nanorc (907B)
1 ## Syntax highlighting for the packet-filtering rules of Netfilter. 2 3 ## Original author: Arturo Borrero González 4 ## License: GPL version 3 or newer 5 6 syntax nftables "\.(nft|nftables)$" 7 header "^#!.*(nft|nftables)" 8 comment "#" 9 10 # Objects and operations 11 color green "\<(chain|hook|policy|priority|ruleset|set|table|type|v?map)\>" 12 color green "\<(define|include)\>" 13 color red "\<(add|delete|flush|insert|remove|replace)\>" 14 15 # Families 16 color yellow "\<(arp|bridge|inet|ingress|ip6?|netdev)\>" 17 18 # Terminal statements 19 color red "\<(drop|reject)\>" 20 color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>" 21 22 # Comments 23 color cyan "(^|[[:blank:]])#.*" 24 25 # Trailing whitespace 26 color ,green "[[:space:]]+$" 27 28 # Strings 29 color yellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'" 30 31 # Syntactic symbols 32 color green "[][{}():;|`$<>!=&\]" 33 34 # Basic variable names 35 color brightred "(\$|@)[[:alpha:]_-][[:alnum:]_.-]*"