aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/terminal/terminalwidget.cpp
diff options
context:
space:
mode:
authorDavid Schulz <[email protected]>2023-08-22 08:10:48 +0200
committerDavid Schulz <[email protected]>2023-08-22 08:10:48 +0200
commit5122d8addc945b0edd4eff6ef0df9bc8df09de8a (patch)
treee3aa9bfa0ea09a25be96aeea5966c4f1bef936d5 /src/plugins/terminal/terminalwidget.cpp
parent4e0c4b0f23ef85cd7734f1de033caa19d5588004 (diff)
parent64b852e18648a9f7501a1c121da404a6cea0858b (diff)
Merge remote-tracking branch 'origin/11.0'
Diffstat (limited to 'src/plugins/terminal/terminalwidget.cpp')
-rw-r--r--src/plugins/terminal/terminalwidget.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp
index 326ed523915..c648406e39c 100644
--- a/src/plugins/terminal/terminalwidget.cpp
+++ b/src/plugins/terminal/terminalwidget.cpp
@@ -113,6 +113,13 @@ void TerminalWidget::setupPty()
Environment env = m_openParameters.environment.value_or(Environment{})
.appliedToEnvironment(shellCommand.executable().deviceEnvironment());
+ // Set some useful defaults
+ env.setFallback("TERM", "xterm-256color");
+ env.setFallback("TERM_PROGRAM", QCoreApplication::applicationName());
+ env.setFallback("COLORTERM", "truecolor");
+ env.setFallback("COMMAND_MODE", "unix2003");
+ env.setFallback("INIT_CWD", QCoreApplication::applicationDirPath());
+
// For git bash on Windows
env.prependOrSetPath(shellCommand.executable().parentDir());
if (env.hasKey("CLINK_NOAUTORUN"))