script-publish.py: Add more control codes (reset1, reset2, ...)
authorW. Trevor King <wking@tremily.us>
Sun, 13 Jan 2013 14:34:24 +0000 (09:34 -0500)
committerW. Trevor King <wking@tremily.us>
Sun, 13 Jan 2013 14:34:24 +0000 (09:34 -0500)
These new codes were from a typescript where I had used the `reset`
command.  Xterm doesn't support rs3, but I thought I'd add it for
completeness.

The reset commands are listed in order of decreasing complication
(rs3, rs2, rs1), so that if rs1 is a subset of rs2, we don't match
part of an rs2 entry with our rs1 regexp and leave the rest unmatched.
Ideally, we'll only match the low level escape codes, and compound
escapes like rs2 will be handled automatically by taking care of their
constituent parts.  Until we get to that point, we'll need to be
careful about the order of ControlCodes.

posts/script/script-publish.py

index c156fdebf3a7b00017f24a269f9135f6432726b1..b772e8bae2783c524621350d9508809c57d6cbab 100755 (executable)
@@ -407,8 +407,14 @@ class ControlParser (object):
             ControlCode('cursor normal visibility', 'cnorm', term=self._term),
             # Funky stuff
             ControlCode('horizontal tab', 'ht', term=self._term),
+            ControlCode('set tab', 'hts', term=self._term),
+            ControlCode('clear all tabs', 'tbc', term=self._term),
+            ControlCode('reset 3', 'rs3', term=self._term),
+            ControlCode('reset 2', 'rs2', term=self._term),
+            ControlCode('reset 1', 'rs1', term=self._term),
             ControlCode('insert line', 'il1', term=self._term),
             ControlCode('insert line', 'il', term=self._term),
+            ControlCode('insert character', 'ich'),
             ControlCode('erase characters', 'ech', term=self._term),
             ControlCode('operating system command',
                         regexp=_re.compile(b'\x1b]'), term=self._term),  # [1]