From 1ba027c277723f9f15bceab76be5a199c13c4bda Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Aug 2022 16:55:17 +0530 Subject: [PATCH] Dont show LC_CTYPE in show_kitty_env_vars when running with system python on macOS --- kitty/boss.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kitty/boss.py b/kitty/boss.py index 80363126a..ada6c258a 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -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', '''