Files
go-highlite/syntax_files/ifconfig.yaml
T

32 lines
821 B
YAML

filetype: ifconfig
detect:
filename: "\\.ifconfig$"
rules:
# IPv4
- green: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"
# ipv6
- green: "\\b[0-9a-fA-F]{1,4}(\\:\\:?[0-9a-fA-F]{1,4})+"
# hwaddr
- yellow: "(\\d|[a-f]){2}(\\:(\\d|[a-f]){2}){5}"
# size
- yellow: "\\d+(\\.\\d+)?\\s(T|G|M|K|)i?B"
# interface
- cyan: "^([a-z0-9.-]{2,}\\d*):?\\s"
#ip disc
- cyan: "(inet6?|netmask|broadcast|ether|loop)"
# mtu
- green: "(?i)mtu(\\s|\\:)\\d+"
#errors
- red: "errors(\\s|\\:)\\d+"
- red: "collisions(\\s|\\:)\\d+"
- yellow: "flags=(-?\\d+<[A-Z,]+>)"
- red: "dropped(\\s|\\:)\\d+"
- magenta: "overruns(\\s|\\:)\\d+"
- yellow: "frame(\\s|\\:)\\d+"
- yellow: "(Ethernet|Local Loopback)"
- cyan: "carrier(\\s|\\:)\\d+"
- cyan: "packets\\s+\\d+"
- high.green: "bytes\\s+\\d+"