pmacs3/mode/shell.py

19 lines
479 B
Python

import color, mode
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(mode.Fundamental):
name = 'Shell'
grammar = ShellGrammar()
colors = {
'shell_mesg': ('green', 'default', 'bold'),
'shell_input': ('cyan', 'default', 'bold'),
}
install = Shell.install