egui_code_editor/syntax/
shell.rs1use super::{DEFAULT_QUOTES, Syntax};
2use std::collections::BTreeSet;
3
4impl Syntax {
5 pub fn shell() -> Self {
6 Syntax {
7 language: "Shell",
8 case_sensitive: true,
9 comment: "#",
10 quotes: DEFAULT_QUOTES.into(),
11 hyperlinks: BTreeSet::from(["http"]),
12 keywords: BTreeSet::from([
13 "echo", "read", "set", "unset", "readonly", "shift", "export", "if", "fi", "else",
14 "while", "do", "done", "for", "until", "case", "esac", "break", "continue", "exit",
15 "return", "trap", "wait", "eval", "exec", "ulimit", "umask",
16 ]),
17 comment_multiline: [": '", "'"],
18 types: BTreeSet::from([
19 "ENV",
20 "HOME",
21 "IFS",
22 "LANG",
23 "LC_ALL",
24 "LC_COLLATE",
25 "LC_CTYPE",
26 "LC_MESSAGES",
27 "LINENO",
28 "NLSPATH",
29 "PATH",
30 "PPID",
31 "PS1",
32 "PS2",
33 "PS4",
34 "PWD",
35 ]),
36 special: BTreeSet::from([
37 "alias", "bg", "cd", "command", "false", "fc", "fg", "getopts", "jobs", "kill",
38 "newgrp", "pwd", "read", "true", "umask", "unalias", "wait",
39 ]),
40 }
41 }
42}