summaryrefslogtreecommitdiff
path: root/statuspage/lib/common.sh
diff options
context:
space:
mode:
authorbatsumaru <>2026-07-01 17:46:33 +0900
committerbatsumaru <>2026-07-01 17:46:33 +0900
commit018f92b5a0d7ee97747720e28d48bdf8b0134f2e (patch)
treea942df578f85d1f955447e84bf66d03d52f3f534 /statuspage/lib/common.sh
parentdf56450813b04c09cd24783c6ae3093f189c4519 (diff)
Abbreviate pf rule text so rows fit the column without wrapping
pfctl's verbose syntax (flags S/SA, quick, from any to any port = X, proto tcp/udp/icmp) was overflowing the .section column width and wrapping mid-rule. abbreviate_rule() in pf.sh strips the near- universal boilerplate tokens on this ruleset and swaps in/out for arrows - cuts each rule to roughly 35-45% of its original length. Deliberately not a real pf syntax parser: it's a handful of targeted sed substitutions, so a rule shape it doesn't recognize just passes through unshortened rather than mangling. Only uses the Arrows block (confirmed shipped in the scientifica font) - avoided Dingbats (checkmark/X) since that block isn't included in this font. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'statuspage/lib/common.sh')
0 files changed, 0 insertions, 0 deletions