Skip to content

Commit

Permalink
syntax: spec: colorize all canonical architecture names
Browse files Browse the repository at this point in the history
The list of canonical names was found in:
  https://github.com/rpm-software-management/rpm/blob/master/rpmrc.in

The canonical names were extracted with:

  grep arch_canon rpmrc.in | sed 's/^.*:\s*//' | sed 's/\s*..\?$//'

and then sorted and condensed into a regular expression.

Inspired-by: Funda Wang <[email protected]>
  • Loading branch information
Benno Schulenberg committed Sep 22, 2024
1 parent 468613c commit 1862995
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion syntax/extra/spec.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:"
color brightblue "\<(License|Copyright|Distribution|Vendor|Packager)[[:space:]]*:"
color brightblue "\<((Source|Patch)[0-9]*|Nosource|Nopatch)[[:space:]]*:"
# Architectures.
color brightred "\<(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppciseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x?|noarch)\>"
color brightred "\<((a|loong)arch64|alpha(ev(56?|67?)|pca56)?|amd64|armv(3l|4b|4l|5t(ej?)?l|6h?l|7(hn?)?l|8h?l)|athlon|em64t|geode|i370|i(3|4|5|6)86|ia32e|ia64|m68k(mint)?|mips(64)?(el|r6|r6el)?)\>"
color brightred "\<(pentium(3|4)|ppc(32dy4|8260|8560)?|ppc64(le|p7)?|ppc(64)?(i|p)series|riscv64|rs6000|s390x?|sgi|sh(3|4|4a)?|sparc(64v?|v8|v9v?)?|x86_64(_v2|_v3|_v4)?|xtensa)\>"

# Architecture and OS conditionals.
color brightred "%(ifarch|elifarch|ifnarch|ifos|elifos|ifnos)\>"
# %* strings.
Expand Down

0 comments on commit 1862995

Please sign in to comment.