diff --git a/ChangeLog b/ChangeLog
index 5915afd2c6853a403d24282b6c73b39b210b16f4..141d389d71283e5443ff4b7e84edf1b84d31abd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -445,6 +445,8 @@ CVS code -
 	  used to highlight trailing whitespace, since we now support
 	  background colors without foreground colors. (DLR)
 	- Further simplify the "groff" regexes. (DLR)
+	- Tweak the "shellscript" regexes to properly color all special
+	  variables, such as $? and $@. (Benno Schulenberg)
 - src/Makefile.am:
 	- If we're uninstalling, remove the "rnano" symlink. (DLR, found
 	  by Benno Schulenberg)
diff --git a/doc/nanorc.sample b/doc/nanorc.sample
index c786cf09ad8463477bf57d31f8e8223afe0d2ac5..bd7e58516a9022010d9126406917acf2bc269ef6 100644
--- a/doc/nanorc.sample
+++ b/doc/nanorc.sample
@@ -360,8 +360,8 @@
 # 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 brightred "\$\{?[0-9A-Z_]+\}?"
-# color yellow "#.*$"
+# icolor brightred "\$\{?[0-9A-Z_!@#$*-?]+\}?"
+# color yellow "(^|[[:space:]])#.*$"
 # color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
 
 ## Here is an example for your .nanorc.