diff --git a/ShellScript/Bash.sublime-syntax b/ShellScript/Bash.sublime-syntax index a5c8d5e9d8..1343166b1a 100644 --- a/ShellScript/Bash.sublime-syntax +++ b/ShellScript/Bash.sublime-syntax @@ -510,7 +510,7 @@ contexts: - include: immediately-pop cmd-declare-args: - - match: ([-+])(?:[aAgilnrtux]*[Ff][aAgilnrtux]*) + - match: ([-+])(?:[aAgiIlnrtux]*[Ff][aAgiIlnrtux]*) scope: meta.parameter.option.shell variable.parameter.option.shell @@ -528,7 +528,7 @@ contexts: - include: cmd-args-end-of-options-then-variables cmd-declare-options: - - match: ([-+])(?:[aAgilnrtux]+|p) + - match: ([-+])(?:[aAgiIlnrtux]+|p) scope: meta.parameter.option.shell variable.parameter.option.shell diff --git a/ShellScript/test/syntax_test_bash.sh b/ShellScript/test/syntax_test_bash.sh index 12798eb560..f9fd25f47e 100755 --- a/ShellScript/test/syntax_test_bash.sh +++ b/ShellScript/test/syntax_test_bash.sh @@ -1463,6 +1463,12 @@ declare -A foo bar # 'foo' and 'bar' are variable names # ^ - meta.declaration.variable # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.number-sign.shell +declare -I foo +#^^^^^^ meta.declaration.variable.shell +# ^^^^^^^ meta.declaration.variable.arguments.shell +# ^^ variable.parameter.option.shell +# ^^^ variable.other.readwrite.shell + declare ret; bar=foo # comment #^^^^^^ meta.declaration.variable.shell # ^^^^ meta.declaration.variable.arguments.shell