summaryrefslogtreecommitdiff
blob: 92dc30dd0fbcadb0cc95c62c9f1b7b88ff6535c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Here is an example for ebuilds/eclasses
##
# syntax "ebuild" "\.e(build|class)$"
## All the standard portage functions
# color brightgreen "^src_(unpack|compile|install)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
## 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)\>"
# color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
# color green "-(e|d|f|r|g|u|w|x|L)\>"
# 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]+\}?"
# color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT)\>"
# color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>"
## Highlight portage commands
# color magenta "\<use(_(with|enable))?\> [a-z0-9X ]*" "inherit.*"
# color brightblue "e(begin|end|conf|install|make|warn|infon?|error|patch)"
# color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
# color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe)\>"
# color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>" 
# color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.so|man|strip)"
# color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins)opts\>"
## Highlight common commands used in ebuilds
# color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
## Highlight comments (doesnt work that well)
# color yellow "#.*$"
## Highlight strings (doesnt work that well)
# color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"