19 lines
484 B
Python
19 lines
484 B
Python
from mode import Fundamental
|
|
from lex import Grammar, PatternRule, RegionRule
|
|
from mode.sh import ShGrammar
|
|
|
|
class ShellGrammar(Grammar):
|
|
rules = [
|
|
PatternRule(r'shell_input', r'^>>>.*$'),
|
|
PatternRule(r'shell_mesg', r'^===.*$'),
|
|
]
|
|
class Shell(Fundamental):
|
|
name = 'Shell'
|
|
grammar = ShellGrammar()
|
|
colors = {
|
|
'shell_mesg': ('green', 'default', 'bold'),
|
|
'shell_input': ('cyan', 'default', 'bold'),
|
|
}
|
|
|
|
install = Shell.install
|