]> git.wh0rd.org Git - nano.git/commitdiff
Colour a $VAR within "" but not within ''.
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 23 Feb 2014 16:15:38 +0000 (16:15 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Sun, 23 Feb 2014 16:15:38 +0000 (16:15 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/sh.nanorc

index d0e50c081cbf4ab963237eecdcdd9e7f231c5855..aaf2f19424cd6d08f4b05ecdf4efc7e96755172f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index f6601057074b90bd7a70f15ebffbe65b6f8a456b..f5922339f98f60dc2ee7b6bee2078be23a87da85 100644 (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:]]+$"