From 2d90cf324e0a6aeffe326d0d817d993cae72e053 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Wed, 28 Jan 2009 18:32:33 +0000 Subject: [PATCH] 2009-01-28 Davide Pesavento * doc/syntax/gentoo.nanorc: Updates from David and Mike Frysinger. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ doc/syntax/gentoo.nanorc | 33 +++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index e17e5816..b787dae3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-01-28 Davide Pesavento + * doc/syntax/gentoo.nanorc: Updates from David and Mike Frysinger. + 2009-01-25 Chris Allegretta * files.c (open_file), nanorc.c (parse_include): Don't get_full_path on included rc files, due to it potentially impacting the ability diff --git a/doc/syntax/gentoo.nanorc b/doc/syntax/gentoo.nanorc index 6e3470b8..8bafe2d6 100644 --- a/doc/syntax/gentoo.nanorc +++ b/doc/syntax/gentoo.nanorc @@ -2,26 +2,30 @@ ## syntax "ebuild" "\.e(build|class)$" ## All the standard portage functions -color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" +color brightgreen "^src_(unpack|prepare|configure|compile|install|test)" "^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|continue|break)\>" +color green "\<(declare|eval|exec|let)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" -color green "-(e|d|f|r|g|u|w|x|L)\>" +color green "-[edfgruwxL]\>" 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|USERLAND)\>" -color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\" "\" "\" +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\>" "\" +color red "\" "\" "\" ## Highlight portage commands color magenta "\ [!a-zA-Z0-9_+ -]*" "inherit.*" -color brightblue "\" -color brightblue "\" "\" "\" "\" "\<(has|best)_version\>" "\" -color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" +color brightblue "\" +color brightblue "\" "\" +color brightblue "\" "\" "\" +color brightblue "\" "\" "\" "\" "\<(has|best)_version\>" +color brightblue "\<(do|new)(ins|(games)?s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" color brightblue "\" "\" -color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" -color brightblue "\<(|doc|ins|exe)into\>" "\" "\<(exe|ins|dir)opts\>" +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\>" ## Highlight common commands used in ebuilds -color blue "\" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>" +color blue "\" "\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>" ## Highlight comments (doesnt work that well) color yellow "#.*$" ## Highlight strings (doesnt work that well) @@ -31,17 +35,18 @@ color ,green "[[:space:]]+$" ## Here is an example for Portage control files ## -syntax "/etc/portage" "\.(keywords|mask|unmask|use)$" +syntax "/etc/portage" "\.(keywords|mask|unmask|use)(/.+)?$" ## Base text: color green "^.+$" ## Use flags: color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+" color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+" -## Likely version numbers: +## Likely version and slot numbers: color magenta "-[[:digit:]].*([[:space:]]|$)" +color magenta ":[^[:space:]]+([[:space:]]|$)" ## Accepted arches: -color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>" -color white "[[:space:]][~-]?\*" +color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc(-fbsd)?|x86(-fbsd)?)\>" +color white "[[:space:]][*~-]?\*" ## Categories: color cyan "^[[:space:]]*.*/" ## Masking regulators: -- 2.39.5