diff options
author | Nathaniel Case <ncase@redhat.com> | 2020-07-22 08:56:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 08:56:21 -0400 |
commit | 06a4fc28336e3c26c7b53ec78239d716d6aa0914 (patch) | |
tree | 88e269731c4bcaad4068a9eb840a2d21d4a0d269 /lib/ansible/plugins/terminal | |
parent | b7ee07215d24430554a0b289c0811bd6a9ce9aad (diff) | |
download | ansible-06a4fc28336e3c26c7b53ec78239d716d6aa0914.tar.gz |
Document existing ansi_re sequences and add `ESC[m` (#70683)
* Document existing ansi_re sequences and add `ESC[m`
* Add changelog
Diffstat (limited to 'lib/ansible/plugins/terminal')
-rw-r--r-- | lib/ansible/plugins/terminal/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/plugins/terminal/__init__.py b/lib/ansible/plugins/terminal/__init__.py index 23b497cfb3..bb3ad1812f 100644 --- a/lib/ansible/plugins/terminal/__init__.py +++ b/lib/ansible/plugins/terminal/__init__.py @@ -48,8 +48,9 @@ class TerminalBase(with_metaclass(ABCMeta, object)): #: compiled bytes regular expressions to remove ANSI codes ansi_re = [ - re.compile(br'(\x1b\[\?1h\x1b=)'), - re.compile(br'\x08.') + re.compile(br'\x1b\[\?1h\x1b='), # CSI ? 1 h ESC = + re.compile(br'\x08.'), # [Backspace] . + re.compile(br"\x1b\[m"), # ANSI reset code ] #: terminal initial prompt |