Dont show LC_CTYPE in show_kitty_env_vars when running with system python on macOS

This commit is contained in:
Kovid Goyal 2022-08-30 16:55:17 +05:30
parent d8e43a3412
commit 1ba027c277
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2414,8 +2414,11 @@ class Boss:
@ac('debug', 'Show the environment variables that the kitty process sees')
def show_kitty_env_vars(self) -> None:
w = self.active_window
env = os.environ.copy()
if is_macos and env.get('LC_CTYPE') == 'UTF-8' and not getattr(sys, 'kitty_run_data').get('lc_ctype_before_python'):
del env['LC_CTYPE']
if w:
output = '\n'.join(f'{k}={v}' for k, v in os.environ.items())
output = '\n'.join(f'{k}={v}' for k, v in env.items())
self.display_scrollback(w, output, title=_('Current kitty env vars'), report_cursor=False)
@ac('debug', '''