summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-03 09:19:47 +0800
committerGitHub <[email protected]>2025-11-03 09:19:47 +0800
commitef232054688770d4d858866019ee29eb3b17d318 (patch)
tree2ae42e9b17cd0bb5dd4d6981cd8f258e7a7029a4
parent6b06ceace57ef4ea7c0996e382d98267ce2a8216 (diff)
parent0215721fbd83887be071792a8e8b87262b3c71bd (diff)
Merge pull request #6987 from apocelipes/feat-ghostty
improve(tty): support detect ghostty
-rw-r--r--xmake/core/base/tty.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua
index 471fb355a..d35705770 100644
--- a/xmake/core/base/tty.lua
+++ b/xmake/core/base/tty.lua
@@ -291,6 +291,7 @@ end
-- - terminator
-- - rxvt
-- - lxterminal
+-- - ghostty
-- - unknown
--
function tty.term()
@@ -305,6 +306,8 @@ function tty.term()
term = "vscode"
elseif TERM_PROGRAM == "mintty" then
term = "mintty" -- git bash
+ elseif TERM_PROGRAM == "ghostty" then
+ term = "ghostty"
end
end
end
@@ -313,7 +316,9 @@ function tty.term()
if term == nil then
local TERM = os.getenv("TERM")
if TERM ~= nil then
- if TERM:find("xterm", 1, true) then
+ if TERM:find("ghostty", 1, true) then
+ term = "ghostty"
+ elseif TERM:find("xterm", 1, true) then
term = "xterm"
elseif TERM == "cygwin" then
term = "cygwin"