Small bug fixes [release]

This commit is contained in:
crschnick 2023-03-28 16:58:23 +00:00
parent 1ff572da03
commit 53068eb943
5 changed files with 22 additions and 23 deletions

View file

@ -2,11 +2,11 @@
### A smart connection manager and remote file explorer ### 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. 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 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. text/code editors, terminals, shells, command-line tools and more.
The platform is open source and designed to be extensible, allowing anyone The platform is open source and designed to be extensible, allowing anyone
to implement custom functionality through custom extensions. 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. 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: 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 Discord Server](https://discord.gg/8y89vS8cRb)
- The [X-Pipe Slack Server](https://join.slack.com/t/x-pipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg) - The [X-Pipe Slack Server](https://join.slack.com/t/x-pipe/shared_invite/zt-1awjq0t5j-5i4UjNJfNe1VN4b_auu6Cg)

View file

@ -99,7 +99,10 @@ final class FileListModel {
} }
if (entry.isDirectory()) { if (entry.isDirectory()) {
fileSystemModel.cd(entry.getPath()); var dir = fileSystemModel.cd(entry.getPath());
if (dir.isPresent()) {
fileSystemModel.cd(dir.get());
}
} else { } else {
FileOpener.openInTextEditor(entry); FileOpener.openInTextEditor(entry);
} }

View file

@ -50,27 +50,21 @@ public class ScriptHelper {
} }
public static String constructInitFile( public static String constructInitFile(
ShellControl processControl, List<String> init, String toExecuteInShell) { ShellControl processControl, List<String> init, String toExecuteInShell,boolean login) {
ShellDialect t = processControl.getShellDialect(); 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(); String nl = t.getNewLine().getNewLineString();
var content = String.join(nl, init) + nl; var content = String.join(nl, init) + nl;
var applyCommand = t.applyRcFileCommand(); if (login) {
if (applyCommand != null) { var applyProfilesCommand = t.applyProfileFilesCommand();
content = applyCommand + "\n" + content; if (applyProfilesCommand != null) {
content = applyProfilesCommand + "\n" + content;
}
}
var applyRcCommand = t.applyRcFileCommand();
if (applyRcCommand != null) {
content = applyRcCommand + "\n" + content;
} }
if (toExecuteInShell != null) { if (toExecuteInShell != null) {

View file

@ -23,6 +23,10 @@ public interface ShellDialect {
return null; return null;
} }
default String applyProfileFilesCommand() {
return null;
}
CommandControl createStreamFileWriteCommand(ShellControl shellControl, String file); CommandControl createStreamFileWriteCommand(ShellControl shellControl, String file);
default String getCdCommand(String directory){ default String getCdCommand(String directory){

View file

@ -1 +1 @@
0.5.22 0.5.23