diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt index 3afe91262f42..52d82ea2f604 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/CommunityRepositoryModules.kt @@ -230,7 +230,6 @@ object CommunityRepositoryModules { plugin("intellij.terminal") { spec -> spec.withResource("resources/zsh/.zshenv", "zsh") spec.withResource("resources/zsh/hooks.zsh", "zsh") - spec.withResource("resources/bash/jediterm-bash.in", "bash") spec.withResource("resources/fish/init.fish", "fish") spec.withResource("resources/pwsh/pwsh.ps1", "pwsh") spec.withResource("resources/shell-integrations", "shell-integrations") diff --git a/plugins/terminal/resources/bash/jediterm-bash.in b/plugins/terminal/resources/shell-integrations/bash/bash-integration.bash similarity index 94% rename from plugins/terminal/resources/bash/jediterm-bash.in rename to plugins/terminal/resources/shell-integrations/bash/bash-integration.bash index b4a4d63fb543..cf06a832b1dc 100644 --- a/plugins/terminal/resources/bash/jediterm-bash.in +++ b/plugins/terminal/resources/shell-integrations/bash/bash-integration.bash @@ -92,7 +92,7 @@ function configureCommandHistory { configureCommandHistory JETBRAINS_INTELLIJ_BASH_DIR="$(dirname "${BASH_SOURCE[0]}")" -if [ -r "${JETBRAINS_INTELLIJ_BASH_DIR}/hooks.bash" ]; then - source "${JETBRAINS_INTELLIJ_BASH_DIR}/hooks.bash" +if [ -r "${JETBRAINS_INTELLIJ_BASH_DIR}/command-block-support.bash" ]; then + source "${JETBRAINS_INTELLIJ_BASH_DIR}/command-block-support.bash" fi unset JETBRAINS_INTELLIJ_BASH_DIR diff --git a/plugins/terminal/resources/bash/hooks.bash b/plugins/terminal/resources/shell-integrations/bash/command-block-support.bash similarity index 100% rename from plugins/terminal/resources/bash/hooks.bash rename to plugins/terminal/resources/shell-integrations/bash/command-block-support.bash diff --git a/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalCustomizer.java b/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalCustomizer.java index 322b0ccb09d5..fe4ee7a88f46 100644 --- a/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalCustomizer.java +++ b/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalCustomizer.java @@ -20,7 +20,7 @@ public abstract class LocalTerminalCustomizer { * @param envs mutable map of environment variables * @return new command to run. Original {@code command} should be returned if no alterations performed * @apiNote terminal starting shell session with user-specified shell. Under the hood we are running shell with custom rcfile, e.g.: - * {@code /usr/bin/bash --rcfile PATH_TO/community/plugins/terminal/resources/bash/jediterm-bash.in}. See the {@code jediterm-bash.in} script + * {@code /usr/bin/bash --rcfile PATH_TO/bash-integration.bash}. See the {@code bash-integration.bash} script * for more information on how to alter the execution process. */ public String[] customizeCommandAndEnvironment(@NotNull Project project, diff --git a/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java b/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java index 02140f3017a7..7670946b9253 100644 --- a/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java +++ b/plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java @@ -79,7 +79,7 @@ public class LocalTerminalDirectRunner extends AbstractTerminalRunner "bash/jediterm-bash.in"; + case BASH_NAME, SH_NAME -> "shell-integrations/bash/bash-integration.bash"; case ZSH_NAME -> "zsh/.zshenv"; case FISH_NAME -> "fish/init.fish"; default -> null; diff --git a/plugins/terminal/tests/org/jetbrains/plugins/terminal/TerminalShellCommandTest.java b/plugins/terminal/tests/org/jetbrains/plugins/terminal/TerminalShellCommandTest.java index 02c50a40e600..0b631f3ec7e5 100644 --- a/plugins/terminal/tests/org/jetbrains/plugins/terminal/TerminalShellCommandTest.java +++ b/plugins/terminal/tests/org/jetbrains/plugins/terminal/TerminalShellCommandTest.java @@ -33,10 +33,10 @@ public class TerminalShellCommandTest extends TestCase { public void testAddRcConfig() { if (SystemInfo.isUnix) { - hasRcConfig("bash -i", "bash/jediterm-bash.in", Maps.newHashMap()); - hasRcConfig("bash --login", "bash/jediterm-bash.in", Maps.newHashMap()); + hasRcConfig("bash -i", "bash/bash-integration.bash", Maps.newHashMap()); + hasRcConfig("bash --login", "bash/bash-integration.bash", Maps.newHashMap()); Map envs = Maps.newHashMap(); - hasRcConfig("bash --rcfile ~/.bashrc", "bash/jediterm-bash.in", envs); + hasRcConfig("bash --rcfile ~/.bashrc", "bash/bash-integration.bash", envs); assertTrue(envs.get("JEDITERM_USER_RCFILE").contains(".bashrc")); } } diff --git a/python/python-terminal/src/com/jetbrains/python/sdk/PyVirtualEnvTerminalCustomizer.kt b/python/python-terminal/src/com/jetbrains/python/sdk/PyVirtualEnvTerminalCustomizer.kt index 66605d0bc4d4..e32658279733 100644 --- a/python/python-terminal/src/com/jetbrains/python/sdk/PyVirtualEnvTerminalCustomizer.kt +++ b/python/python-terminal/src/com/jetbrains/python/sdk/PyVirtualEnvTerminalCustomizer.kt @@ -101,7 +101,7 @@ class PyVirtualEnvTerminalCustomizer : LocalTerminalCustomizer() { } if (isShellIntegrationAvailable(shellPath)) { //fish shell works only for virtualenv and not for conda - //for bash we pass activate script to jediterm shell integration (see jediterm-bash.in) to source it there + //for bash we pass activate script to shell integration (see bash-integration.bash) to source it there //TODO: fix conda for fish [also in fleet.language.python.PythonVirtualEnvTerminalPreprocessor#preprocess] findActivateScript(sdkHomePath.path, shellPath)?.let { activate ->