Fix incorrect ANSI sequence restoring console title

ANSI sequences use the form "\033[" -- with a left/opening square bracket... [ , not the right/closing one.
This commit is contained in:
Glenn Slayden 2020-09-20 01:35:01 -07:00 committed by GitHub
parent b55715934b
commit d1b64f4a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -535,7 +535,7 @@ class YoutubeDL(object):
# already of type unicode()
ctypes.windll.kernel32.SetConsoleTitleW(ctypes.c_wchar_p(message))
elif 'TERM' in os.environ:
self._write_string('\033]0;%s\007' % message, self._screen_file)
self._write_string('\033[0;%s\007' % message, self._screen_file)
def save_console_title(self):
if not self.params.get('consoletitle', False):