Terminal: Fix Shellintegration for bash

bash needs long options to be before short options.

Change-Id: I277a9283253f11bcb76e0366a0b6c5a0346fdfd8
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-05-11 15:46:59 +02:00
parent 3e3a202e75
commit 161cac0a85

View File

@@ -120,7 +120,12 @@ void ShellIntegration::prepareProcess(Utils::Process &process)
m_tempDir.filePath(filesToCopy.bash.rcFile.fileName())); m_tempDir.filePath(filesToCopy.bash.rcFile.fileName()));
rcPath.copyFile(tmpRc); 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") { } else if (cmd.executable().baseName() == "zsh") {
for (const FileToCopy &file : filesToCopy.zsh.files) { for (const FileToCopy &file : filesToCopy.zsh.files) {
const auto copyResult = file.source.copyFile( const auto copyResult = file.source.copyFile(