kitten run-shell: Make kitty terminfo database available if needed before starting the shell

This commit is contained in:
Kovid Goyal
2023-09-01 22:05:26 +05:30
parent 71a2d7359a
commit 0be1295023
9 changed files with 106 additions and 9 deletions

View File

@@ -351,7 +351,7 @@ func make_tarfile(cd *connection_data, get_local_env func(string) (string, bool)
}
err = add_entries(path.Join("home", ".terminfo"), shell_integration.Data()["terminfo/kitty.terminfo"])
if err == nil {
err = add_entries(path.Join("home", ".terminfo", "x"), shell_integration.Data()["terminfo/x/xterm-kitty"])
err = add_entries(path.Join("home", ".terminfo", "x"), shell_integration.Data()["terminfo/x/"+kitty.DefaultTermName])
}
if err == nil {
err = tw.Close()

View File

@@ -7,6 +7,7 @@ import (
"encoding/json"
"fmt"
"io/fs"
"kitty"
"kitty/tools/utils/shm"
"os"
"os/exec"
@@ -133,7 +134,7 @@ func TestSSHTarfile(t *testing.T) {
if !seen["data.sh"] {
t.Fatalf("data.sh missing")
}
for _, x := range []string{".terminfo/kitty.terminfo", ".terminfo/x/xterm-kitty"} {
for _, x := range []string{".terminfo/kitty.terminfo", ".terminfo/x/" + kitty.DefaultTermName} {
if !seen["home/"+x] {
t.Fatalf("%s missing", x)
}