Version: 1.0.01.0.11.0.21.0.31.0.41.1.01.1.11.2.07.0.17.1.07.2.07.3.07.4.07.5.08.0.08.1.08.2.08.3.08.4.08.5.08.6.08.7.08.8.08.9.08.9.19.0.09.1.09.2.09.3.09.4.09.5.09.6.09.7.09.8.09.9.09.10.09.11.09.12.09.13.09.13.19.14.19.14.29.15.19.15.29.15.59.15.69.15.79.15.89.15.99.15.109.16.19.16.29.17.09.17.19.18.09.18.19.18.29.18.39.18.49.18.510.0.0-beta.010.0.010.0.110.0.210.0.310.1.010.1.110.1.210.2.010.2.110.3.010.3.110.3.210.4.0-beta010.4.0-beta110.4.010.4.110.5.010.6.010.7.010.7.110.7.210.7.311.0.0-alpha011.0.0-alpha111.0.0-beta011.0.0-beta111.0.011.0.111.1.011.2.011.3.011.3.111.4.011.5.011.5.111.6.011.7.011.8.011.9.0
/*
Language: Shell Session
Requires: bash.js
Author: TSUYUSATO Kitsune <make.just.on@gmail.com>
Category: common
Audit: 2020
*/
/** @type LanguageFn */
function shell(hljs) {
return {
name: 'Shell Session',
aliases: [
'console',
'shellsession'
],
contains: [
{
className: 'meta.prompt',
// We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result.
// For instance, in the following example, it would match "echo /path/to/home >" as a prompt:
// echo /path/to/home > t.exe
begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,
starts: {
end: /[^\\](?=\s*$)/,
subLanguage: 'bash'
}
]
};
module.exports = shell;