Terminal: Fix shell integration for login shells

Change-Id: I78cc4b60b4e2164752b7b65e2e61659e5d5bbe22
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-05-09 10:07:05 +02:00
parent 12504b6802
commit 5ea6c34a23

View File

@@ -54,15 +54,15 @@ bool ShellIntegration::canIntegrate(const Utils::CommandLine &cmdLine)
if (cmdLine.executable().needsDevice())
return false; // TODO: Allow integration for remote shells
if (!cmdLine.arguments().isEmpty())
if (cmdLine.executable().baseName() == "zsh")
return true;
if (!cmdLine.arguments().isEmpty() && cmdLine.arguments() != "-l")
return false;
if (cmdLine.executable().baseName() == "bash")
return true;
if (cmdLine.executable().baseName() == "zsh")
return true;
if (cmdLine.executable().baseName() == "pwsh"
|| cmdLine.executable().baseName() == "powershell") {
return true;