diff --git a/README.md b/README.md index b3a20994..55cf16bf 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ### A smart connection manager and remote file explorer -X-Pipe is a brand new type of connection manager and remote file explorer that works by exclusively interacting with CLI tools on local and remote shell connections. +X-Pipe is a brand-new type of connection manager and remote file explorer that works by exclusively interacting with CLI tools on local and remote shell connections. This approach makes it much more flexible as it doesn't have to deal with file system APIs or remote file handling protocols at all. X-Pipe integrates with your existing tools and workflows -by outsourcing as much tasks as possible to your +by outsourcing as many tasks as possible to your text/code editors, terminals, shells, command-line tools and more. The platform is open source and designed to be extensible, allowing anyone to implement custom functionality through custom extensions. @@ -15,8 +15,6 @@ to implement custom functionality through custom extensions. Head over to the [releases page](https://github.com/xpipe-io/xpipe/releases) and try it out. -Feel free to file tickets for bugs or feature requests. Upvote 👍 the ones you'd like to see prioritized. - There are several ways to reach out in case you encounter any issues or questions: - The [X-Pipe Discord Server](https://discord.gg/8y89vS8cRb) - The [X-Pipe Slack Server](https://join.slack.com/t/x-pipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg) diff --git a/app/src/main/java/io/xpipe/app/browser/FileListModel.java b/app/src/main/java/io/xpipe/app/browser/FileListModel.java index 44eb5083..35487117 100644 --- a/app/src/main/java/io/xpipe/app/browser/FileListModel.java +++ b/app/src/main/java/io/xpipe/app/browser/FileListModel.java @@ -99,7 +99,10 @@ final class FileListModel { } if (entry.isDirectory()) { - fileSystemModel.cd(entry.getPath()); + var dir = fileSystemModel.cd(entry.getPath()); + if (dir.isPresent()) { + fileSystemModel.cd(dir.get()); + } } else { FileOpener.openInTextEditor(entry); } diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index b5b12d9e..4e48c0e1 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -50,27 +50,21 @@ public class ScriptHelper { } public static String constructInitFile( - ShellControl processControl, List init, String toExecuteInShell) { + ShellControl processControl, List init, String toExecuteInShell,boolean login) { ShellDialect t = processControl.getShellDialect(); - - // We always want to generate and init file - if (init.size() == 0 && toExecuteInShell == null) { - return createExecScript(processControl, processControl.getShellDialect().getNewLine().getNewLineString()); - } - - if (init.size() == 0) { - // Check for special case of the command to be executed just being another shell script - if (toExecuteInShell.endsWith(".sh") || toExecuteInShell.endsWith(".bat")) { - return toExecuteInShell; - } - } - String nl = t.getNewLine().getNewLineString(); var content = String.join(nl, init) + nl; - var applyCommand = t.applyRcFileCommand(); - if (applyCommand != null) { - content = applyCommand + "\n" + content; + if (login) { + var applyProfilesCommand = t.applyProfileFilesCommand(); + if (applyProfilesCommand != null) { + content = applyProfilesCommand + "\n" + content; + } + } + + var applyRcCommand = t.applyRcFileCommand(); + if (applyRcCommand != null) { + content = applyRcCommand + "\n" + content; } if (toExecuteInShell != null) { 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 665afe1a..bbca8842 100644 --- a/core/src/main/java/io/xpipe/core/process/ShellDialect.java +++ b/core/src/main/java/io/xpipe/core/process/ShellDialect.java @@ -23,6 +23,10 @@ public interface ShellDialect { return null; } + default String applyProfileFilesCommand() { + return null; + } + CommandControl createStreamFileWriteCommand(ShellControl shellControl, String file); default String getCdCommand(String directory){ diff --git a/version b/version index d4d44d05..2db101c8 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.5.22 \ No newline at end of file +0.5.23 \ No newline at end of file