Terminal: Add setting to change arguments of default shell

On non windows systems, initialize it with "-l" to start a login shell.

Change-Id: I972f845c3933c6a54752d4c71108a658311a0256
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-03-25 15:50:00 +01:00
parent c7b6c66cab
commit 5db27d21da
4 changed files with 24 additions and 7 deletions

View File

@@ -141,7 +141,9 @@ void TerminalWidget::setupPty()
Environment env = m_openParameters.environment.value_or(Environment::systemEnvironment());
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
CommandLine{TerminalSettings::instance().shell.filePath(), {}});
CommandLine{TerminalSettings::instance().shell.filePath(),
TerminalSettings::instance().shellArguments.value(),
CommandLine::Raw});
// For git bash on Windows
env.prependOrSetPath(shellCommand.executable().parentDir());