javaFXPlugin("javaFX-CE"),
plugin("terminal") {
withResource("resources/.zshrc", "")
- withResource("resources/jediterm-sh.in", "")
+ withResource("resources/jediterm-bash.in", "")
}
]
private static String findRCFile(String shellName) {
if (shellName != null) {
- if ("bash".equals(shellName)) {
- shellName = "sh";
+ if ("sh".equals(shellName)) {
+ shellName = "bash";
}
try {
String rcFilePath = findRCFile(shellName);
-
if (rcFilePath != null &&
shellIntegration) {
- if (shellName.equals("bash") || shellName.equals("sh")) {
+ if (shellName.equals("bash") || (SystemInfo.isMac && shellName.equals("sh"))) {
addRcFileArgument(envs, command, result, rcFilePath, "--rcfile");
}
else if (shellName.equals("zsh")) {
}
public void testAddRcConfig() {
- hasRcConfig("bash -i", "jediterm-sh.in", Maps.newHashMap());
- hasRcConfig("sh --login", "jediterm-sh.in", Maps.newHashMap());
+ hasRcConfig("bash -i", "jediterm-bash.in", Maps.newHashMap());
+ hasRcConfig("sh --login", "jediterm-bash.in", Maps.newHashMap());
Map<String, String> envs = Maps.newHashMap();
- hasRcConfig("sh --rcfile ~/.bashrc", "jediterm-sh.in", envs);
+ hasRcConfig("sh --rcfile ~/.bashrc", "jediterm-bash.in", envs);
assertEquals("~/.bashrc", envs.get("JEDITERM_SOURCE"));
}
val shellPath = command[0]
val shellName = File(shellPath).name
- if (shellName == "bash" || shellName == "sh") {
- //for bash and sh we pass activate script to jediterm shell integration (see jediterm-sh.in) to source it there
+ if (shellName == "bash" || (SystemInfo.isMac && shellName == "sh")) {
+ //for bash we pass activate script to jediterm shell integration (see jediterm-bash.in) to source it there
findActivateScript(path, shellPath)?.let { activate -> envs.put("JEDITERM_SOURCE", activate) }
}
else {