From f35dc9f46aa81d281ed94bdca7aec23363f9c1d2 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sat, 18 Jun 2022 00:45:28 +0200 Subject: [PATCH] Detect termux --- src/detection/terminalShell.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/detection/terminalShell.c b/src/detection/terminalShell.c index 9767c1ad8..c4cabff20 100644 --- a/src/detection/terminalShell.c +++ b/src/detection/terminalShell.c @@ -122,6 +122,13 @@ static void getTerminalFromEnv(FFTerminalShellResult* result) if(!ffStrSet(term) && getenv("WT_SESSION") != NULL) term = "Windows Terminal"; + //Termux + if(!ffStrSet(term) && ( + getenv("TERMUX_VERSION") != NULL || + getenv("TERMUX_MAIN_PACKAGE_FORMAT") != NULL || + getenv("TMUX_TMPDIR") != NULL + )) term = "Termux"; + //Normal Terminal if(!ffStrSet(term)) term = getenv("TERM");