2009-03-30 23:15:27 -04:00
|
|
|
from mode import Fundamental
|
2008-09-12 09:31:48 -04:00
|
|
|
from lex import Grammar, PatternRule, RegionRule
|
|
|
|
from mode.sh import ShGrammar
|
|
|
|
|
|
|
|
class ShellGrammar(Grammar):
|
|
|
|
rules = [
|
2008-09-19 12:58:00 -04:00
|
|
|
PatternRule(r'shell_input', r'^>>>.*$'),
|
|
|
|
PatternRule(r'shell_mesg', r'^===.*$'),
|
2008-09-12 09:31:48 -04:00
|
|
|
]
|
2009-03-30 23:15:27 -04:00
|
|
|
class Shell(Fundamental):
|
2009-03-17 15:24:10 -04:00
|
|
|
name = 'Shell'
|
2008-09-19 12:58:00 -04:00
|
|
|
grammar = ShellGrammar()
|
2009-03-17 15:24:10 -04:00
|
|
|
colors = {
|
2008-09-19 12:58:00 -04:00
|
|
|
'shell_mesg': ('green', 'default', 'bold'),
|
|
|
|
'shell_input': ('cyan', 'default', 'bold'),
|
2008-09-12 09:31:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
install = Shell.install
|