2014-02-23 20:07:44 +04:00
|
|
|
## Here is an example for Gentoo ebuilds/eclasses.
|
2008-03-20 07:45:55 +03:00
|
|
|
##
|
|
|
|
syntax "ebuild" "\.e(build|class)$"
|
|
|
|
## All the standard portage functions
|
2009-01-28 21:32:33 +03:00
|
|
|
color brightgreen "^src_(unpack|prepare|configure|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Highlight bash related syntax
|
|
|
|
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
|
2009-01-28 21:32:33 +03:00
|
|
|
color green "\<(declare|eval|exec|let)\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
2009-01-28 21:32:33 +03:00
|
|
|
color green "-[edfgruwxL]\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
|
|
|
|
## Highlight variables ... official portage ones in red, all others in bright red
|
|
|
|
color brightred "\$\{?[a-zA-Z_0-9]+\}?"
|
2009-01-28 21:32:33 +03:00
|
|
|
color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|(P|R)?DEPEND|PROVIDE|PROPERTIES|RESTRICT|USERLAND)\>"
|
|
|
|
color red "\<(S|D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|ROOT|WORKDIR)\>" "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
|
|
|
|
color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>" "\<WANT_AUTO(CONF|MAKE)\>" "\<AT_M4DIR\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Highlight portage commands
|
|
|
|
color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
|
2009-01-28 21:32:33 +03:00
|
|
|
color brightblue "\<e(begin|end|conf|install|make|qmake[34]|ant|(qa)?warn|infon?|error|log|patch|new(group|user))\>"
|
|
|
|
color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make))\>"
|
|
|
|
color brightblue "\<built_with_use\>" "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
|
|
|
|
color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>"
|
2009-08-18 06:55:22 +04:00
|
|
|
color brightblue "\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
|
2009-08-18 06:55:22 +04:00
|
|
|
color brightblue "prepall(docs|info|man|strip)?" "prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
|
|
|
|
color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>" "\<(exe|ins|dir)opts\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Highlight common commands used in ebuilds
|
2009-01-28 21:32:33 +03:00
|
|
|
color blue "\<make\>" "\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Highlight comments (doesnt work that well)
|
2009-11-22 19:36:53 +03:00
|
|
|
color yellow "(^|[[:space:]])#.*$"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Highlight strings (doesnt work that well)
|
|
|
|
color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
|
|
|
|
## Trailing space is bad!
|
|
|
|
color ,green "[[:space:]]+$"
|
|
|
|
|
2014-02-23 20:07:44 +04:00
|
|
|
## Here is an example for Portage control files.
|
2008-03-20 07:45:55 +03:00
|
|
|
##
|
2009-01-28 21:32:33 +03:00
|
|
|
syntax "/etc/portage" "\.(keywords|mask|unmask|use)(/.+)?$"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Base text:
|
|
|
|
color green "^.+$"
|
|
|
|
## Use flags:
|
|
|
|
color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+"
|
|
|
|
color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+"
|
2009-01-28 21:32:33 +03:00
|
|
|
## Likely version and slot numbers:
|
2008-03-20 07:45:55 +03:00
|
|
|
color magenta "-[[:digit:]].*([[:space:]]|$)"
|
2009-01-28 21:32:33 +03:00
|
|
|
color magenta ":[^[:space:]]+([[:space:]]|$)"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Accepted arches:
|
2009-01-28 21:32:33 +03:00
|
|
|
color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc(-fbsd)?|x86(-fbsd)?)\>"
|
|
|
|
color white "[[:space:]][*~-]?\*"
|
2008-03-20 07:45:55 +03:00
|
|
|
## Categories:
|
|
|
|
color cyan "^[[:space:]]*.*/"
|
|
|
|
## Masking regulators:
|
|
|
|
color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
|
|
|
|
## Comments:
|
|
|
|
color yellow "#.*$"
|