/*! `bash` grammar compiled for Highlight.js 11.11.1 */
(function () {
var hljsGrammar = (function () {
'use strict';
/*
Language: Bash
Category: common
*/
function bash(hljs) {
const VAR = {
className: 'term-variable',
variants: [
{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)\}/}
]
};
const QUOTE_STRING = {
className: 'term-string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VAR,
{
className: 'term-variable',
begin: /\$\(/, end: /\)/,
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
const APOS_STRING = {
className: 'term-string',
begin: /'/, end: /'/
};
return {
name: 'Bash',
aliases: ['bash', 'sh', 'zsh'],
contains: [
hljs.HASH_COMMENT_MODE,
QUOTE_STRING,
APOS_STRING,
// Command at start of line
{
className: 'term-command',
begin: /^\s*[\w\d_-]+/,
},
// Options starting with -
{
className: 'term-option',
begin: /\s-[\w\d_-]+/,
},
VAR,
{
className: 'term-number',
begin: /\b\d+\b/
}
]
};
}
return bash;
})();
hljs.registerLanguage('bash', hljsGrammar);
})();
/*! `bash` grammar compiled for Highlight.js 11.11.1 */
(function () {
var hljsGrammar = (function () {
'use strict';
/*
Language: Bash
Category: common
*/
function bash(hljs) {
const VAR = {
className: 'term-variable',
variants: [
{begin: /\$[\w\d#@][\w\d_]*/},
{begin: /\$\{(.*?)\}/}
]
};
const QUOTE_STRING = {
className: 'term-string',
begin: /"/, end: /"/,
contains: [
hljs.BACKSLASH_ESCAPE,
VAR,
{
className: 'term-variable',
begin: /\$\(/, end: /\)/,
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
const APOS_STRING = {
className: 'term-string',
begin: /'/, end: /'/
};
return {
name: 'Bash',
aliases: ['bash', 'sh', 'zsh'],
contains: [
hljs.HASH_COMMENT_MODE,
QUOTE_STRING,
APOS_STRING,
// Command at start of line
{
className: 'term-command',
begin: /^\s*[\w\d_-]+/,
},
// Options starting with -
{
className: 'term-option',
begin: /\s-[\w\d_-]+/,
},
VAR,
{
className: 'term-number',
begin: /\b\d+\b/
}
]
};
}
return bash;
})();
hljs.registerLanguage('bash', hljsGrammar);
})();