]> luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/shell.js
Initial commit.
[flow-web.git] / static / highlight / es / languages / shell.js
1 /*! `shell` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar = (function () {
3 'use strict';
4
5 /*
6 Language: Shell Session
7 Requires: bash.js
8 Author: TSUYUSATO Kitsune <make.just.on@gmail.com>
9 Category: common
10 Audit: 2020
11 */
12
13 /** @type LanguageFn */
14 function shell(hljs) {
15 return {
16 name: 'Shell Session',
17 aliases: [
18 'console',
19 'shellsession'
20 ],
21 contains: [
22 {
23 className: 'meta.prompt',
24 // We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result.
25 // For instance, in the following example, it would match "echo /path/to/home >" as a prompt:
26 // echo /path/to/home > t.exe
27 begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,
28 starts: {
29 end: /[^\\](?=\s*$)/,
30 subLanguage: 'bash'
31 }
32 }
33 ]
34 };
35 }
36
37 return shell;
38
39 })();
40 ;
41 export default hljsGrammar;