diff --git a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java index fc134ae62..8d778f9ab 100644 --- a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java @@ -742,7 +742,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue { @Override public int getProcessHierarchyOffset() { - return 1; + return ProcessControlProvider.get().getEffectiveLocalDialect() == ShellDialects.BASH ? 0 : 1; } @Override diff --git a/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java index f512e893c..56a8c8e1e 100644 --- a/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java @@ -1,5 +1,6 @@ package io.xpipe.app.terminal; +import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.util.CommandSupport; import io.xpipe.app.util.LocalShell; @@ -7,6 +8,8 @@ import io.xpipe.app.util.ShellTemp; import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.process.CommandBuilder; import io.xpipe.core.process.ShellControl; +import io.xpipe.core.process.ShellDialect; +import io.xpipe.core.process.ShellDialects; import io.xpipe.core.store.FilePath; import io.xpipe.core.util.XPipeInstallation; @@ -96,7 +99,7 @@ public interface KittyTerminalType extends ExternalTerminalType, TrackableTermin @Override public int getProcessHierarchyOffset() { - return 1; + return ProcessControlProvider.get().getEffectiveLocalDialect() == ShellDialects.BASH ? 0 : 1; } public boolean isAvailable() {