Terminal: Add Shell option menu

Change-Id: I08ea3c52ed28ab65f2dc902051bab9e6975e6a7e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-02-23 15:21:26 +01:00
parent 58abb397e7
commit c6dc54b343
3 changed files with 95 additions and 9 deletions

View File

@@ -92,12 +92,13 @@ void TerminalWidget::setupPty()
m_ptyProcess.reset(PtyQt::createPtyProcess(IPtyProcess::PtyType::AutoPty));
Environment env = m_openParameters.environment.value_or(Environment::systemEnvironment());
// Why?
env.appendOrSetPath(TerminalSettings::instance().shell.filePath().parentDir());
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
CommandLine{TerminalSettings::instance().shell.filePath(), {}});
// For git bash on Windows
env.prependOrSetPath(shellCommand.executable().parentDir());
QStringList envList = filtered(env.toStringList(), [](const QString &envPair) {
return envPair != "CLINK_NOAUTORUN=1";
});