Commit 7a536e18 authored by Jeffery To's avatar Jeffery To Committed by Christian Hergert

sh.lang: Make "for-command" context end earlier

This changes the "for-command" context to end earlier, so that it does
not accidentally consume other keywords.

Fixes #40
parent f93a7029
......@@ -218,12 +218,12 @@
<context id="for-command">
<context id="for-command" end-at-line-end="true">
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="def:line-continue"/>
<context style-ref="variable-definition" once-only="true">
......@@ -34,3 +34,16 @@ xxx${x#"*"}xxx
if var=$(cmd); then some; fi
test -f xxx && var=xxx || var=yyy
for word in hello world
echo $word
for arg; do echo $arg; done
for \
arg; do echo $arg; done
echo Look for file
echo Look for; echo Look for
echo next line
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment