summaryrefslogtreecommitdiff
path: root/rc/filetype/sh.kak
diff options
context:
space:
mode:
authorLennard Hofmann <lennard.hofmann@web.de>2020-11-14 09:54:25 +0100
committerLennard Hofmann <lennard.hofmann@web.de>2020-11-14 11:29:32 +0100
commit00857eaadcb9466c504efa16411dc6caa1c777a4 (patch)
treea296fdd51ca330bcc6c581fc305faac63b3acb64 /rc/filetype/sh.kak
parent27e95ed6579adf40921bdad66bc4fc7fee94d539 (diff)
sh.kak: Do not treat bitwise operator << as here-document start
Diffstat (limited to 'rc/filetype/sh.kak')
-rw-r--r--rc/filetype/sh.kak2
1 files changed, 2 insertions, 0 deletions
diff --git a/rc/filetype/sh.kak b/rc/filetype/sh.kak
index 55ae3251..06565a8d 100644
--- a/rc/filetype/sh.kak
+++ b/rc/filetype/sh.kak
@@ -22,12 +22,14 @@ provide-module sh %ยง
add-highlighter shared/sh regions
add-highlighter shared/sh/code default-region group
+add-highlighter shared/sh/arithmetic region -recurse \(.*?\( (\$|(?<=for)\h*)\(\( \)\) group
add-highlighter shared/sh/double_string region %{(?<!\\)(?:\\\\)*\K"} %{(?<!\\)(?:\\\\)*"} group
add-highlighter shared/sh/single_string region %{(?<!\\)(?:\\\\)*\K'} %{'} fill string
add-highlighter shared/sh/expansion region -recurse (?<!\\)(?:\\\\)*\K\$\{ (?<!\\)(?:\\\\)*\K\$\{ \}|\n fill value
add-highlighter shared/sh/comment region (?<!\\)(?:\\\\)*(?:^|\h)\K# '$' fill comment
add-highlighter shared/sh/heredoc region -match-capture '<<-?\h*''?(\w+)''?' '^\t*(\w+)$' fill string
+add-highlighter shared/sh/arithmetic/expansion ref sh/double_string/expansion
add-highlighter shared/sh/double_string/fill fill string
evaluate-commands %sh{