Fix highlighting of escaped quotes in shell scripts. Incorporates and extends patch by Shawn McMahon <smcmahon@eiv.com>. - enscript - GNU Enscript
(HTM) git clone git://thinkerwim.org/enscript.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 309191449dee4b93e2b1015665c2f3ad41f0801e
(DIR) parent 8b4d4869f5b391424c888fa7ab9f0d1508d137f7
(HTM) Author: Tim Retout <diocles@gnu.org>
Date: Tue, 1 Jan 2008 16:35:06 +0000
Fix highlighting of escaped quotes in shell scripts.
Incorporates and extends patch by Shawn McMahon <smcmahon@eiv.com>.
Diffstat:
M THANKS | 2 ++
M states/hl/ChangeLog | 11 +++++++++++
M states/hl/bash.st | 11 +++++++++++
M states/hl/csh.st | 11 +++++++++++
M states/hl/ksh.st | 11 +++++++++++
M states/hl/sh.st | 11 +++++++++++
M states/hl/tcsh.st | 11 +++++++++++
M states/hl/zsh.st | 11 +++++++++++
8 files changed, 79 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/THANKS b/THANKS
@@ -28,3 +28,4 @@ Keith Refson <Keith.Refson@earth.ox.ac.uk>
Manolis Lourakis <lourakis@csd.uch.gr>
Tait Cyrus <tait.cyrus@mci.com>
Guentcho D. Skordev <ut13@rz.uni-karlsruhe.de>
+Shawn McMahon <smcmahon@eiv.com>
+\ No newline at end of file
(DIR) diff --git a/states/hl/ChangeLog b/states/hl/ChangeLog
@@ -1,3 +1,14 @@
+2008-01-01 Tim Retout <diocles@gnu.org>
+
+ * bash.st (bash): Fix highlighting of escaped quote marks.
+ * csh.st (csh): Likewise.
+ * ksh.st (ksh): Likewise.
+ * sh.st (sh): Likewise.
+ * tcsh.st (tcsh): Likewise.
+ * zsh.st (zsh): Likewise.
+ Incorporates and extends original patch for ksh.st and sh.st by
+ Shawn McMahon <smcmahon@eiv.com>.
+
2003-02-27 Markku Rossi <mtr@amme.hel.fi.ssh.com>
* pyrex.st: Highlighting rules for the Pyrex language (Pyrex - a
(DIR) diff --git a/states/hl/bash.st b/states/hl/bash.st
@@ -22,6 +22,17 @@ state bash extends HighlightEntry
string_face (false);
}
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
/* Excutable script. */
/^#!/ {
reference_face (true);
(DIR) diff --git a/states/hl/csh.st b/states/hl/csh.st
@@ -22,6 +22,17 @@ state csh extends HighlightEntry
string_face (false);
}
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
/* Excutable script. From sh */
/^#!/ {
reference_face (true);
(DIR) diff --git a/states/hl/ksh.st b/states/hl/ksh.st
@@ -26,6 +26,17 @@ state ksh extends HighlightEntry
string_face (false);
}
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
/* Excutable script. */
/^#!/ {
reference_face (true);
(DIR) diff --git a/states/hl/sh.st b/states/hl/sh.st
@@ -22,6 +22,17 @@ state sh extends HighlightEntry
string_face (false);
}
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
/* Excutable script. */
/^#!/ {
reference_face (true);
(DIR) diff --git a/states/hl/tcsh.st b/states/hl/tcsh.st
@@ -22,6 +22,17 @@ state tcsh extends HighlightEntry
string_face (false);
}
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
/* Excutable script. From sh */
/^#!/ {
reference_face (true);
(DIR) diff --git a/states/hl/zsh.st b/states/hl/zsh.st
@@ -22,6 +22,17 @@ state zsh extends HighlightEntry
string_face (false);
}
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
/* Excutable script. */
/^#!/ {
reference_face (true);