From 161cac0a85a61678da4e8722639bf952fe4aa32b Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 11 May 2023 15:46:59 +0200 Subject: [PATCH] Terminal: Fix Shellintegration for bash bash needs long options to be before short options. Change-Id: I277a9283253f11bcb76e0366a0b6c5a0346fdfd8 Reviewed-by: hjk --- src/plugins/terminal/shellintegration.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(