Skip to content

Commit f35dc9f

Browse files
Detect termux
1 parent a620918 commit f35dc9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/detection/terminalShell.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ static void getTerminalFromEnv(FFTerminalShellResult* result)
122122
if(!ffStrSet(term) && getenv("WT_SESSION") != NULL)
123123
term = "Windows Terminal";
124124

125+
//Termux
126+
if(!ffStrSet(term) && (
127+
getenv("TERMUX_VERSION") != NULL ||
128+
getenv("TERMUX_MAIN_PACKAGE_FORMAT") != NULL ||
129+
getenv("TMUX_TMPDIR") != NULL
130+
)) term = "Termux";
131+
125132
//Normal Terminal
126133
if(!ffStrSet(term))
127134
term = getenv("TERM");

0 commit comments

Comments
 (0)