From da811ad87e8118e867896bcaba663886247d6620 Mon Sep 17 00:00:00 2001 From: Michael Lopez Date: Tue, 21 Apr 2015 09:00:55 +0200 Subject: [PATCH] Fixed for bad regex. From justinribeiro/nanorc@449447fffeba --- sh.nanorc | 2 +- zsh.nanorc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sh.nanorc b/sh.nanorc index abf6619..5f0f729 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -8,7 +8,7 @@ color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" color green "-[Ldefgruwx]\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" -icolor brightgreen "^\s+?[0-9A-Z_]+\s+?\(\)" +icolor brightgreen "^\s+[0-9A-Z_]+\s+\(\)" icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" color cyan "(^|[[:space:]])#.*$" diff --git a/zsh.nanorc b/zsh.nanorc index 443c0a3..d9949b6 100644 --- a/zsh.nanorc +++ b/zsh.nanorc @@ -1,5 +1,5 @@ ## Syntax highlighting for ZSH scripts (initially copied from sh.nanorc) -syntax "zsh" "\.?zsh[^\.]+?$" +syntax "zsh" "\.zsh[^\.]+$" header "^#!.*/(env +)?zsh( |$)" ## Numbers @@ -20,7 +20,7 @@ color brightblue "\<(add-zsh-hook|autoload|compinit|echotc|emulate|print|prompt( color brightmagenta "\<(cat|chmod|chown|cp|cut|echo|env|false|find|grep|head|install|kill|less|ln|make|mkdir|mv|nice|pwd|rm|rmdir|sed|tar|true|touch|uname|wc|whoami)\>" ## Function definition -icolor brightgreen "^\s+?(function\s+)?[0-9A-Z_]+\s+?\(\)" +icolor brightgreen "^\s+(function\s+)[0-9A-Z_]+\s+\(\)" ## Variables icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"