mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-10-07 15:41:30 +00:00
Fix terminal launch codepages
This commit is contained in:
3 files changed
+6
-4
No files matched your search
@@ -28,7 +28,7 @@ public interface ShellDialect {
|
||||
return null;
|
||||
}
|
||||
|
||||
String terminalLauncherScript(UUID request, String name, boolean alwaysPromptRestart);
|
||||
String terminalLauncherScript(ShellControl sc, UUID request, String name, boolean alwaysPromptRestart);
|
||||
|
||||
String getExecutableName();
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.xpipe.app.terminal;
|
||||
|
||||
import io.xpipe.app.beacon.AppBeaconServer;
|
||||
import io.xpipe.app.core.AppInstallation;
|
||||
import io.xpipe.app.core.AppNames;
|
||||
import io.xpipe.app.issue.ErrorEventFactory;
|
||||
@@ -401,6 +402,7 @@ public class TerminalLauncher {
|
||||
var registerLine = CommandBuilder.of()
|
||||
.addFile(sc.getLocalSystemAccess().translateFromLocalSystemPath(FilePath.of(exec)))
|
||||
.add("terminal-register", "--request", request.toString())
|
||||
.add("--port", AppBeaconServer.get().getPort() + "")
|
||||
.buildSimple();
|
||||
var powershell = ShellDialects.isPowershell(sc);
|
||||
var bellLine = "printf \"\\a\"";
|
||||
|
||||
@@ -70,7 +70,7 @@ public class TerminalPaneConfiguration {
|
||||
var sc = LocalShell.getShell();
|
||||
var register = TerminalLauncher.getTerminalRegisterCommand(request, sc);
|
||||
var launcherScript = (debugMode ? sc.getShellDialect().getSetEnvironmentVariableCommand("XPIPE_DEBUG", "true") + "\n" : "") +
|
||||
register + "\n" + sc.getShellDialect().terminalLauncherScript(request, title, alwaysPromptRestart);
|
||||
register + "\n" + sc.getShellDialect().terminalLauncherScript(sc, request, title, alwaysPromptRestart);
|
||||
var config = new TerminalPaneConfiguration(request, title, paneIndex, launcherScript, sc.getShellDialect());
|
||||
return config;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class TerminalPaneConfiguration {
|
||||
var launcherScript = ScriptHelper.createExecScript(
|
||||
ShellDialects.POWERSHELL,
|
||||
sc,
|
||||
ShellDialects.POWERSHELL.terminalLauncherScript(request, title, alwaysPromptRestart));
|
||||
ShellDialects.POWERSHELL.terminalLauncherScript(sc, request, title, alwaysPromptRestart));
|
||||
var content = """
|
||||
%s
|
||||
%s
|
||||
@@ -121,7 +121,7 @@ public class TerminalPaneConfiguration {
|
||||
LocalShell.getShell(),
|
||||
LocalShell.getShell()
|
||||
.getShellDialect()
|
||||
.terminalLauncherScript(request, title, alwaysPromptRestart));
|
||||
.terminalLauncherScript(sc, request, title, alwaysPromptRestart));
|
||||
var command = sc == LocalShell.getShell()
|
||||
? launcherScript
|
||||
: LocalShell.getShell()
|
||||
|
||||
Reference in new issue
Block a user