netstar pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ab02b4fa46dfb66778121f990d5e27d388467bb5

commit ab02b4fa46dfb66778121f990d5e27d388467bb5
Author: Alastair Poole <nets...@gmail.com>
Date:   Mon Sep 6 09:39:01 2021 +0100

    code: add simple shell syntax highlighting.
---
 src/lib/elementary/elm_code_syntax.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/lib/elementary/elm_code_syntax.c 
b/src/lib/elementary/elm_code_syntax.c
index dbdf7d32f7..59784ffa5c 100644
--- a/src/lib/elementary/elm_code_syntax.c
+++ b/src/lib/elementary/elm_code_syntax.c
@@ -156,6 +156,19 @@ static Elm_Code_Syntax _elm_code_syntax_csharp =
      "orderby","select","where","unmanaged","var", NULL }
 };
 
+static Elm_Code_Syntax _elm_code_syntax_shell =
+{
+   "{}()[]:;%^/*+&|~!=<->,.",
+   "",
+   NULL,
+   "#",
+   NULL,
+   NULL,
+   _elm_code_syntax_scope_change_braces,
+   { "if", "then", "else", "elif", "fi", "case", "esac", "for", "select", 
"while", "until", "do" \
+     "done", "in", "function", "time", "coproc", NULL }
+};
+
 EAPI Elm_Code_Syntax *
 elm_code_syntax_for_mime_get(const char *mime)
 {
@@ -175,6 +188,8 @@ elm_code_syntax_for_mime_get(const char *mime)
      return &_elm_code_syntax_go;
    if (!strcmp("text/x-csharp", mime))
      return &_elm_code_syntax_csharp;
+   if (!strcmp("application/x-shellscript", mime))
+     return &_elm_code_syntax_shell;
 
    return NULL;
 }

-- 


Reply via email to