diff --git a/core/src/main/java/io/xpipe/core/process/CommandBuilder.java b/core/src/main/java/io/xpipe/core/process/CommandBuilder.java index a5e25547c..b02411c24 100644 --- a/core/src/main/java/io/xpipe/core/process/CommandBuilder.java +++ b/core/src/main/java/io/xpipe/core/process/CommandBuilder.java @@ -176,6 +176,7 @@ public class CommandBuilder { } public String buildBase(ShellControl sc) throws Exception { + sc.getShellDialect().prepareCommandForShell(this); List list = new ArrayList<>(); for (Element element : elements) { String evaluate = element.evaluate(sc); diff --git a/core/src/main/java/io/xpipe/core/process/ShellDialect.java b/core/src/main/java/io/xpipe/core/process/ShellDialect.java index cacfddf4e..8c8e168e7 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellDialect.java +++ b/core/src/main/java/io/xpipe/core/process/ShellDialect.java @@ -155,6 +155,8 @@ public interface ShellDialect { return getOpenCommand(); } + default void prepareCommandForShell(CommandBuilder b) {} + String prepareTerminalInitFileOpenCommand(ShellDialect parentDialect, ShellControl sc, String file); String runScriptCommand(ShellControl parent, String file); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/action/ScanAction.java b/ext/base/src/main/java/io/xpipe/ext/base/action/ScanAction.java index d64a7f7e8..c12d46498 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/action/ScanAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/action/ScanAction.java @@ -36,6 +36,11 @@ public class ScanAction implements ActionProvider { return o.get().getProvider().shouldHaveChildren(); } + @Override + public boolean isApplicable(DataStoreEntryRef o) { + return o.get().getProvider().canHaveSubShells(); + } + @Override public ObservableValue getName(DataStoreEntryRef store) { return AppI18n.observable("scanConnections"); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java index 0d9301648..7e61939dd 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptGroupStoreProvider.java @@ -101,11 +101,6 @@ public class ScriptGroupStoreProvider implements DataStoreProvider { return "proc:shellEnvironment_icon.svg"; } - @Override - public boolean canHaveSubShells() { - return false; - } - @Override public ObservableValue informationString(StoreEntryWrapper wrapper) { ScriptGroupStore scriptStore = wrapper.getEntry().getStore().asNeeded();