nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e472b725654cbabbce3f532f039afc61c504edec
parent e332d2df7432106eaac2848aefd7edb5aea76533
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon, 14 Nov 2016 13:44:53 -0500

syntax: gentoo: various updates

- make version highlight less blindly greedy and conform to real versions
- move version matching before USE matching to avoid hitting USE flags
  that look like versions
- change USE regex to match the Gentoo PMS
- extend arch match to include more keywords
- make category matching more restrictive to avoid false positives
- drop operators =< and => that Gentoo doesn't support

URL: https://savannah.gnu.org/bugs/?49569
Reported-by: Konstantin Shakhnov <kastian@mail.ru>

Diffstat:
Mdoc/syntax/gentoo.nanorc | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/syntax/gentoo.nanorc b/doc/syntax/gentoo.nanorc @@ -49,19 +49,19 @@ color ,green "[[:space:]]+$" syntax "/etc/portage" "\.(accept_keywords|env|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 and slot numbers: -color magenta "-[[:digit:]].*([[:space:]]|$)" +color magenta "-[[:digit:].]+(_(alpha|beta|pre|rc|p)[[:digit:]]*)*(-r[[:digit:]]+)?([:[:space:]]|$)" color magenta ":[^[:space:]]+([[:space:]]|$)" +## Use flags (must come after version/slot): +color brightred "[[:space:]]+\+?[A-Za-z0-9+_@-]+" +color brightblue "[[:space:]]+-[A-Za-z0-9+_@-]+" ## Accepted arches: -color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc(-fbsd)?|x86(-fbsd)?)\>" +color white "[~-]?\<(alpha|amd64|arm(64)?|hppa|ia64|m68k|mips|nios2|ppc(64)?|riscv|s390|sh|sparc|x86)(-(aix|(f|free|net|open)bsd|cygwin|hpux|interix|linux|macos|mint|solaris|winnt))?\>" color white "[[:space:]][*~-]?\*" ## Categories: -color cyan "^[[:space:]]*.*/" +color cyan "^[[:space:]]*[^/]*/" ## Masking regulators: -color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" +color brightmagenta "^[[:space:]]*(=|~|<|<=|>|>=)" ## Comments: color yellow "#.*$" ## Trailing space is bad!