Colour a $VAR within "" but not within ''.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-02-23 16:15:38 +00:00
parent c4b344f733
commit 1dd389e403
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2014-02-23 Benno Schulenberg <bensberg@justemail.net>
* doc/syntax/*.nanorc - Comment and punctuation tweaks.
* doc/syntax/sh.nanorc - Colour $VAR within a "" string
but not within a '' string, and do not colour strings
within comments. Fixes bug #29943.
2014-02-23 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_undo, do_redo, add_undo) - Make warning

View File

@ -9,7 +9,8 @@ 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)\>"
color brightyellow ""(\\.|[^"])*""
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color brightyellow "'(\\.|[^'])*'"
color cyan "(^|[[:space:]])#.*$"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color ,green "[[:space:]]+$"