Skip to content

Commit 5be4cb0

Browse files
feat(shellscript): add support for shellscript
1 parent abb666b commit 5be4cb0

File tree

5 files changed

+1381
-1
lines changed

5 files changed

+1381
-1
lines changed

grammars/grammars.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,55 @@
337337
"extensions": [".stylus"],
338338
"grammar": "Stylus.tmLanguage"
339339
},
340+
{
341+
"language": "shellscript",
342+
"scopeName": "source.shell",
343+
"aliases": ["Shell Script", "shellscript", "bash", "sh", "zsh", "ksh", "csh"],
344+
"extensions": [
345+
".sh",
346+
".bash",
347+
".bashrc",
348+
".bash_aliases",
349+
".bash_profile",
350+
".bash_login",
351+
".ebuild",
352+
".profile",
353+
".bash_logout",
354+
".xprofile",
355+
".xsession",
356+
".xsessionrc",
357+
".Xsession",
358+
".zsh",
359+
".zshrc",
360+
".zprofile",
361+
".zlogin",
362+
".zlogout",
363+
".zshenv",
364+
".zsh-theme",
365+
".ksh",
366+
".csh",
367+
".cshrc",
368+
".tcshrc",
369+
".yashrc",
370+
".yash_profile"
371+
],
372+
"filenames": [
373+
"APKBUILD",
374+
"PKGBUILD",
375+
".envrc",
376+
".hushlogin",
377+
"zshrc",
378+
"zshenv",
379+
"zlogin",
380+
"zprofile",
381+
"zlogout",
382+
"bashrc_Apple_Terminal",
383+
"zshrc_Apple_Terminal"
384+
],
385+
"grammar": "shell-unix-bash.tmLanguage.json",
386+
"firstLine": "^#!.*\\b(bash|zsh|sh|ksh|dtksh|pdksh|mksh|ash|dash|yash|sh|csh|jcsh|tcsh|itcsh).*|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-",
387+
"mimetypes": ["text/x-shellscript"]
388+
},
340389
{
341390
"language": "jsx-tags",
342391
"extensions": [],
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"comments": {
3+
"lineComment": "#"
4+
},
5+
"brackets": [
6+
["{", "}"],
7+
["[", "]"],
8+
["(", ")"]
9+
],
10+
"autoClosingPairs": [
11+
{ "open": "{", "close": "}" },
12+
{ "open": "[", "close": "]" },
13+
{ "open": "(", "close": ")" },
14+
{ "open": "\"", "close": "\"", "notIn": ["string"] },
15+
{ "open": "'", "close": "'", "notIn": ["string"] },
16+
{ "open": "`", "close": "`", "notIn": ["string"] }
17+
],
18+
"surroundingPairs": [
19+
["{", "}"],
20+
["[", "]"],
21+
["(", ")"],
22+
["\"", "\""],
23+
["'", "'"],
24+
["`", "`"]
25+
],
26+
"folding": {
27+
"markers": {
28+
"start": "^\\s*#\\s*#?region\\b.*",
29+
"end": "^\\s*#\\s*#?endregion\\b.*"
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)