Fixes for powershell remote sessions

This commit is contained in:
crschnick 2023-12-20 09:48:02 +00:00
parent aa71a72f58
commit 1ad11a38a1
4 changed files with 8 additions and 5 deletions

View file

@ -176,6 +176,7 @@ public class CommandBuilder {
}
public String buildBase(ShellControl sc) throws Exception {
sc.getShellDialect().prepareCommandForShell(this);
List<String> list = new ArrayList<>();
for (Element element : elements) {
String evaluate = element.evaluate(sc);

View file

@ -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);

View file

@ -36,6 +36,11 @@ public class ScanAction implements ActionProvider {
return o.get().getProvider().shouldHaveChildren();
}
@Override
public boolean isApplicable(DataStoreEntryRef<ShellStore> o) {
return o.get().getProvider().canHaveSubShells();
}
@Override
public ObservableValue<String> getName(DataStoreEntryRef<ShellStore> store) {
return AppI18n.observable("scanConnections");

View file

@ -101,11 +101,6 @@ public class ScriptGroupStoreProvider implements DataStoreProvider {
return "proc:shellEnvironment_icon.svg";
}
@Override
public boolean canHaveSubShells() {
return false;
}
@Override
public ObservableValue<String> informationString(StoreEntryWrapper wrapper) {
ScriptGroupStore scriptStore = wrapper.getEntry().getStore().asNeeded();