From 5ea6c34a2346732f340c2367e8c1b59ffa39554f Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 9 May 2023 10:07:05 +0200 Subject: [PATCH] Terminal: Fix shell integration for login shells Change-Id: I78cc4b60b4e2164752b7b65e2e61659e5d5bbe22 Reviewed-by: Cristian Adam --- src/plugins/terminal/shellintegration.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/terminal/shellintegration.cpp b/src/plugins/terminal/shellintegration.cpp index 230c6e3da83..cd67318604c 100644 --- a/src/plugins/terminal/shellintegration.cpp +++ b/src/plugins/terminal/shellintegration.cpp @@ -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;