main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
743 bytes
|
Line | |
---|
1 | /*
|
---|
2 | Language: Shell Session
|
---|
3 | Requires: bash.js
|
---|
4 | Author: TSUYUSATO Kitsune <make.just.on@gmail.com>
|
---|
5 | Category: common
|
---|
6 | Audit: 2020
|
---|
7 | */
|
---|
8 |
|
---|
9 | /** @type LanguageFn */
|
---|
10 | function shell(hljs) {
|
---|
11 | return {
|
---|
12 | name: 'Shell Session',
|
---|
13 | aliases: [ 'console' ],
|
---|
14 | contains: [
|
---|
15 | {
|
---|
16 | className: 'meta',
|
---|
17 | // We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result.
|
---|
18 | // For instance, in the following example, it would match "echo /path/to/home >" as a prompt:
|
---|
19 | // echo /path/to/home > t.exe
|
---|
20 | begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,
|
---|
21 | starts: {
|
---|
22 | end: /[^\\](?=\s*$)/,
|
---|
23 | subLanguage: 'bash'
|
---|
24 | }
|
---|
25 | }
|
---|
26 | ]
|
---|
27 | };
|
---|
28 | }
|
---|
29 |
|
---|
30 | module.exports = shell;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.