Remove interactivity switch for sh

This commit is contained in:
Christopher Schnick 2022-12-10 05:20:04 +01:00
parent 2133e2322f
commit b235b438dd
2 changed files with 7 additions and 7 deletions

View file

@ -20,7 +20,7 @@ public interface ShellType {
String createInitFileContent(String command); String createInitFileContent(String command);
String getFileOpenCommand(String file); String getTerminalFileOpenCommand(String file);
default String flatten(List<String> command) { default String flatten(List<String> command) {
return command.stream() return command.stream()

View file

@ -93,7 +93,7 @@ public class ShellTypes {
} }
@Override @Override
public String getFileOpenCommand(String file) { public String getTerminalFileOpenCommand(String file) {
return String.format("%s %s \"%s\"", getExecutable(), "/C", file); return String.format("%s %s \"%s\"", getExecutable(), "/C", file);
} }
@ -283,7 +283,7 @@ public class ShellTypes {
} }
@Override @Override
public String getFileOpenCommand(String file) { public String getTerminalFileOpenCommand(String file) {
return String.format("%s -ExecutionPolicy Bypass -File \"%s\"", getExecutable(), file); return String.format("%s -ExecutionPolicy Bypass -File \"%s\"", getExecutable(), file);
} }
@ -422,7 +422,7 @@ public class ShellTypes {
@Override @Override
public String getPauseCommand() { public String getPauseCommand() {
return "read -rsp \"Press any key to continue...\\n\" -n 1 key"; return "bash -c read -rsp \"Press any key to continue...\\n\" -n 1 key";
} }
public abstract String getName(); public abstract String getName();
@ -448,7 +448,7 @@ public class ShellTypes {
} }
@Override @Override
public String getFileOpenCommand(String file) { public String getTerminalFileOpenCommand(String file) {
return String.format("%s -i -c \"%s\"", getExecutable(), file); return String.format("%s -i -c \"%s\"", getExecutable(), file);
} }
@ -491,12 +491,12 @@ public class ShellTypes {
@Override @Override
public String getNormalOpenCommand() { public String getNormalOpenCommand() {
return getName() + " -i"; return getName();
} }
@Override @Override
public String executeCommandWithShell(String cmd) { public String executeCommandWithShell(String cmd) {
return getName() + " -i -c '" + cmd + "'"; return getName() + " -c '" + cmd + "'";
} }
@Override @Override