aboutsummaryrefslogtreecommitdiff
path: root/lua/lexers/bash.lua
diff options
context:
space:
mode:
authorS. Gilles <sgilles@math.umd.edu>2017-02-07 23:59:36 -0500
committerS. Gilles <sgilles@math.umd.edu>2017-02-07 23:59:36 -0500
commit21727ae3dce8ccea2e342d3b62b5fa67b1b5a936 (patch)
treec6ed5a080f8e723f650f7f87fdfe39811032e36e /lua/lexers/bash.lua
parent533d7bc5249d531738553d4b6834c9b3ca8209c6 (diff)
downloadvis-21727ae3dce8ccea2e342d3b62b5fa67b1b5a936.tar.gz
vis-21727ae3dce8ccea2e342d3b62b5fa67b1b5a936.tar.xz
Allow {} to be nested in shell variables
This allows lines like : ${FOO:="${bar}/baz"} to be highlighted correctly.
Diffstat (limited to 'lua/lexers/bash.lua')
-rw-r--r--lua/lexers/bash.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lexers/bash.lua b/lua/lexers/bash.lua
index f8badba..2fa72f2 100644
--- a/lua/lexers/bash.lua
+++ b/lua/lexers/bash.lua
@@ -46,7 +46,7 @@ local identifier = token(l.IDENTIFIER, l.word)
-- Variables.
local variable = token(l.VARIABLE,
'$' * (S('!#?*@$') + l.digit^1 + l.word +
- l.delimited_range('{}', true, true)))
+ l.delimited_range('{}', true, true, true)))
-- Operators.
local operator = token(l.OPERATOR, S('=!<>+-/*^&|~.,:;?()[]{}'))