From e3467bdada3177bbdfb9d6e0efff316fe4b2c3ea Mon Sep 17 00:00:00 2001 From: ushastoe <40743392+krolchonok@users.noreply.github.com> Date: Sat, 13 Dec 2025 16:48:11 +0300 Subject: [PATCH] Add syntax highlighting for shell scripts --- .config/micro/syntax/shell.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .config/micro/syntax/shell.yaml diff --git a/.config/micro/syntax/shell.yaml b/.config/micro/syntax/shell.yaml new file mode 100644 index 0000000..0b0c12f --- /dev/null +++ b/.config/micro/syntax/shell.yaml @@ -0,0 +1,24 @@ +filetype: sh +detect: + filename: "\\.sh$" + header: "#!.*sh" +rules: + - comment: "(^|\\s)#.*$" + - string: + start: "\"" + end: "\"" + skip: "\\\\." + rules: + - escape: "\\\\(.| +)" + - placeholder: "%[-#0-9]*[.0-9]*[hlL]?[diouxXeEfFgGaAcspn%]" + - string: + start: "'" + end: "'" + skip: "\\\\." + rules: + - escape: "\\\\(.| +)" + - number: "\\b[0-9]+([.][0-9]*)?([eE][+-]?[0-9]+)?\\b" + - symbol: "[\\$\\(\\)\\{\\}\\[\\];\\<>]" + - keyword: "\\b(if|then|else|elif|fi|case|in|do|done|for|while|until|function|return)\\b"