diff --git a/src/plugins/terminal/shellintegration.cpp b/src/plugins/terminal/shellintegration.cpp index cd67318604c..d8e26f94ce5 100644 --- a/src/plugins/terminal/shellintegration.cpp +++ b/src/plugins/terminal/shellintegration.cpp @@ -120,7 +120,12 @@ void ShellIntegration::prepareProcess(Utils::Process &process) m_tempDir.filePath(filesToCopy.bash.rcFile.fileName())); rcPath.copyFile(tmpRc); - cmd.addArgs({"--init-file", tmpRc.nativePath()}); + CommandLine newCmd = {cmd.executable(), {"--init-file", tmpRc.nativePath()}}; + + if (cmd.arguments() == "-l") + newCmd.addArg("-l"); + + cmd = newCmd; } else if (cmd.executable().baseName() == "zsh") { for (const FileToCopy &file : filesToCopy.zsh.files) { const auto copyResult = file.source.copyFile(