Shell integration now aliases sudo to make the kitty terminfo db available in the sudo environment

This should make terminfo completely transparent for most users on the
local machine and on remote machines that are connected to with the ssh
kitten.
This commit is contained in:
Kovid Goyal
2023-09-24 13:35:29 +05:30
parent 0c0c6b732f
commit d96fdb80ed
7 changed files with 28 additions and 4 deletions

View File

@@ -108,6 +108,13 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after
__update_cwd_osc
end
if not contains "no-sudo" $_ksi
# Ensure terminfo is available in sudo
if test -n "$TERMINFO"
alias sudo="sudo TERMINFO=\"$TERMINFO\""
end
end
# Handle clone launches
if test -n "$KITTY_IS_CLONE_LAUNCH"
set --local orig_conda_env "$CONDA_DEFAULT_ENV"