Commit dd7a417c authored by neyfag's avatar neyfag Committed by Christian Hergert

sh.lang: improve recognition of "case ... esac" statement

parent b60a3c1a
......@@ -481,10 +481,10 @@
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="variable-definition"/>
<define-regex id="slitem">([^)'"\s]|\\['"])+</define-regex>
<context style-ref="others">
<match>[^\)\s]+\s*\)|;;</match>
<match>^\s*\%{slitem}?('[^)]+'|"[^)]+")?\%{slitem}?\s*\)|;;</match>
</context>
<context ref="sh"/>
</include>
......
......@@ -29,3 +29,15 @@ xxx${x#$HOME}xxx
xxx${x##*/}xxx
xxx${x#*}xxx
xxx${x#"*"}xxx
# Case statements
case $item in
[1-6]*)
;;
9[1-8])
;;
')')
;;
*)
;;
esac
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment