Only show important env vars in debug output
Also show their values since these are not sensitive
This commit is contained in:
parent
1e7edd0218
commit
12f41f30b3
@ -215,6 +215,16 @@ def debug_config(opts: KittyOpts) -> str:
|
|||||||
p(' ', '\n '.join(opts.config_overrides))
|
p(' ', '\n '.join(opts.config_overrides))
|
||||||
compare_opts(opts, p)
|
compare_opts(opts, p)
|
||||||
p()
|
p()
|
||||||
p(green('Environment variable names seen by the kitty process:'))
|
p(green('Important environment variables seen by the kitty process:'))
|
||||||
p('\t' + '\n\t'.join(sorted(os.environ)))
|
|
||||||
|
def penv(k: str) -> None:
|
||||||
|
v = os.environ.get(k)
|
||||||
|
if v is not None:
|
||||||
|
p('\t' + k.ljust(35), styled(v, dim=True))
|
||||||
|
|
||||||
|
for k in 'PATH LANG KITTY_CONFIG_DIRECTORY KITTY_CACHE_DIRECTORY VISUAL EDITOR GLFW_IM_MODULE KITTY_WAYLAND_DETECT_MODIFIERS'.split():
|
||||||
|
penv(k)
|
||||||
|
for k in os.environ:
|
||||||
|
if k.startswith('LC_'):
|
||||||
|
penv(k)
|
||||||
return out.getvalue()
|
return out.getvalue()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user