From fd5d06d9591b7a8ad908219771c12ff2f1ef045e Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sun, 17 Nov 2024 20:33:02 +0100 Subject: [PATCH] [ShellScript] Fix ZSH case clause termination (#4096) This commit implements different sets of case clause terminators supported by each shell script dialect: Bash: `;;`, `;&` and `;;&` ZSH: `;;`, `;&` and `;|` --- ShellScript/Bash.sublime-syntax | 4 +++- ShellScript/Zsh.sublime-syntax | 4 +++- ShellScript/Zsh/tests/syntax_test_scope.zsh | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ShellScript/Bash.sublime-syntax b/ShellScript/Bash.sublime-syntax index 9d8eadb85d..4d52ab795a 100644 --- a/ShellScript/Bash.sublime-syntax +++ b/ShellScript/Bash.sublime-syntax @@ -1222,7 +1222,7 @@ contexts: - include: statements case-clause-end: - - match: ;;&?|;& + - match: '{{case_clause_end}}' scope: meta.clause.shell punctuation.terminator.clause.shell pop: 1 @@ -3113,6 +3113,8 @@ variables: # in embed...escape statements. no_escape_behind: (?