mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
macOS fixes
This commit is contained in:
parent
4320040c9a
commit
32515720fc
2 changed files with 13 additions and 1 deletions
|
@ -41,7 +41,7 @@ public abstract class MultiExecuteAction implements BranchAction {
|
|||
@Override
|
||||
public String getName(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
||||
var t = AppPrefs.get().terminalType().getValue();
|
||||
return "in " + (t != null ? t.toTranslatedString() : "?");
|
||||
return "in " + (t != null ? t.toTranslatedString().getValue() : "?");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.xpipe.app.browser.OpenFileSystemModel;
|
|||
import io.xpipe.app.browser.action.MultiExecuteAction;
|
||||
import io.xpipe.core.process.OsType;
|
||||
import io.xpipe.core.process.ShellControl;
|
||||
import io.xpipe.core.process.ShellDialects;
|
||||
import io.xpipe.core.store.FileKind;
|
||||
import io.xpipe.core.store.FileSystem;
|
||||
import javafx.scene.Node;
|
||||
|
@ -36,10 +37,21 @@ public class RunAction extends MultiExecuteAction {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (ShellDialects.isPowershell(shell.get()) && Stream.of("ps1")
|
||||
.anyMatch(s -> e.getPath().endsWith(s))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Stream.of("sh", "command").anyMatch(s -> e.getPath().endsWith(s))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!OsType.getLocal().equals(OsType.WINDOWS)) {
|
||||
var attribs = e.getMode();
|
||||
return attribs.contains("x");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue