Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ghostty #12

Open
wagoodman opened this issue Jan 7, 2025 · 0 comments · May be fixed by #13
Open

Add support for ghostty #12

wagoodman opened this issue Jan 7, 2025 · 0 comments · May be fixed by #13

Comments

@wagoodman
Copy link

It looks like there is a section for looking up support based on the TERM and TERM_PROGRAM value

termlink/termlink.go

Lines 105 to 130 in 981ec65

if hasEnv("TERM_PROGRAM") {
v := parseVersion(getEnv("TERM_PROGRAM_VERSION"))
switch term := getEnv("TERM_PROGRAM"); term {
case "iTerm.app":
if v.major == 3 {
return v.minor >= 1
}
return v.major > 3
case "WezTerm":
// Even though WezTerm's version is something like 20200620-160318-e00b076c
// parseVersion will still parse it with a standalone major segment (ie: 20200620)
// with minor and patch segments set to 0
return v.major >= 20200620
case "vscode":
return v.major > 1 || (v.major == 1 && v.minor >= 72)
// Hyper Terminal used to be included in this list, and it even supports hyperlinks
// but the hyperlinks are pseudo-hyperlinks and are actually not clickable
}
}
// Terminals which have a TERM variable set
if matchesEnv("TERM", []string{"xterm-kitty", "xterm-256color", "alacritty", "alacritty-direct"}) {
return true
}

Can you add ghostty to this? Here are some reference values based on what I'm running:

$ env | grep TERM

TERM_PROGRAM=ghostty
TERM=xterm-ghostty
TERM_PROGRAM_VERSION=1.0.1
@wagoodman wagoodman linked a pull request Jan 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant