diff --git a/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java b/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java index 376444ee1..e76a0bd29 100644 --- a/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java +++ b/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java @@ -162,7 +162,7 @@ public final class OpenFileSystemModel { fileSystem .getShell() .get() - .subShell(adjustedPath) + .subShell(processControl -> adjustedPath, (sc) -> adjustedPath) .withInitSnippet(new SimpleScriptSnippet( fileSystem .getShell() diff --git a/core/src/main/java/io/xpipe/core/process/ShellControl.java b/core/src/main/java/io/xpipe/core/process/ShellControl.java index 41b40a90c..f4b7e5a4c 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellControl.java +++ b/core/src/main/java/io/xpipe/core/process/ShellControl.java @@ -13,7 +13,6 @@ import java.util.UUID; import java.util.concurrent.locks.ReentrantLock; import java.util.function.Consumer; import java.util.function.Function; -import java.util.function.Predicate; public interface ShellControl extends ProcessControl { @@ -62,14 +61,6 @@ public interface ShellControl extends ProcessControl { }); } - default ShellControl withSupportCheckInit(Predicate predicate, String name) { - return onInit(shellControl -> { - if (!predicate.test(shellControl)) { - - } - }); - } - default ShellControl withShellStateFail(StatefulDataStore store) { return onFail(shellControl -> { var s = store.getState(); @@ -197,12 +188,9 @@ public interface ShellControl extends ProcessControl { } default ShellControl identicalSubShell() { - return subShell(p -> p.getShellDialect().getLoginOpenCommand(), (sc) -> sc.getShellDialect().getLoginOpenCommand()) - .elevationPassword(getElevationPassword()); - } - - default ShellControl subShell(@NonNull String command) { - return subShell(processControl -> command, (sc) -> command); + return subShell(p -> p.getShellDialect().getLoginOpenCommand(), + (sc) -> sc.getShellDialect().getLoginOpenCommand() + ).elevationPassword(getElevationPassword()); } default T enforceDialect(@NonNull ShellDialect type, FailableFunction sc) throws Exception {