mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-15 08:48:04 +12:00
Remove interactivity switch for sh
This commit is contained in:
parent
2133e2322f
commit
b235b438dd
2 changed files with 7 additions and 7 deletions
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue