From 4c0a7a9566c3a9a27055e7c92e442a5fec580ce0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 7 Nov 2021 10:10:19 +0530 Subject: [PATCH] KSI should be set even when no-rc is specified --- kitty/shell_integration.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kitty/shell_integration.py b/kitty/shell_integration.py index 8efb85690..b991e94cb 100644 --- a/kitty/shell_integration.py +++ b/kitty/shell_integration.py @@ -118,14 +118,16 @@ def setup_shell_integration(opts: Options, env: Dict[str, str]) -> bool: return True -def modify_shell_environ(argv0: str, opts: Options, env: Dict[str, str]) -> bool: +def modify_shell_environ(argv0: str, opts: Options, env: Dict[str, str]) -> None: + if 'disabled' in set(opts.shell_integration.split()): + return + env['KITTY_SHELL_INTEGRATION'] = opts.shell_integration if not shell_integration_allows_rc_modification(opts): - return False + return shell = get_supported_shell_name(argv0) if shell is None: - return False + return f = ENV_MODIFIERS.get(shell) if f is not None: f(env) - env['KITTY_SHELL_INTEGRATION'] = opts.shell_integration - return True + return