Override ssh in kitty to set TERM=xterm-256color

This commit is contained in:
2022-03-28 12:11:43 -07:00
parent 7ae526e91f
commit d49d5d0061
2 changed files with 7 additions and 1 deletions

6
xonsh/kitty.xsh Normal file
View File

@@ -0,0 +1,6 @@
if $TERM == "xterm-kitty":
# Wrap ssh with environment variable because servers tend to deal poorly with kitty
def xterm_ssh(args):
$TERM="xterm-256color" ssh @(*args)
aliases["ssh"] = xterm_ssh

View File

@@ -27,7 +27,7 @@ $ALTERNATE_EDITOR = "vim"
$TERMINAL = "kitty" $TERMINAL = "kitty"
config_dir = p"~/.dotfiles/xonsh" config_dir = p"~/.dotfiles/xonsh"
xsh_modules = ["prompt", "nix", "path", "alias", "java", "linux", "python", "local", "docker"] xsh_modules = ["prompt", "nix", "path", "alias", "java", "linux", "python", "local", "docker", "kitty"]
for module in xsh_modules: for module in xsh_modules:
_p = config_dir / f"{module}.xsh" _p = config_dir / f"{module}.xsh"