mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Rework shell detection and initialization
This should fix some issues with Powershell Core and ttys
This commit is contained in:
parent
7c095cea4c
commit
c511a72187
2 changed files with 5 additions and 1 deletions
|
@ -42,7 +42,7 @@ public class ScriptHelper {
|
|||
ShellControl processControl, List<String> init, String toExecuteInShell, boolean login) {
|
||||
ShellDialect t = processControl.getShellDialect();
|
||||
String nl = t.getNewLine().getNewLineString();
|
||||
var content = String.join(nl, init) + nl;
|
||||
var content = String.join(nl, init.stream().filter(s -> s != null).toList()) + nl;
|
||||
|
||||
if (login) {
|
||||
var applyProfilesCommand = t.applyProfileFilesCommand();
|
||||
|
|
|
@ -19,6 +19,10 @@ public interface ShellDialect {
|
|||
|
||||
String fileArgument(String s);
|
||||
|
||||
void prepareDumbTerminalCommands(ShellControl sc) throws Exception;
|
||||
|
||||
String prepareProperTerminalCommands();
|
||||
|
||||
default String applyRcFileCommand() {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue