From 66194ae855e6b00edc2dac426b8a68a2f8b776b2 Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Mon, 4 Feb 2019 17:33:39 +0300 Subject: [PATCH] Simplify reading environment variables to override (IDEA-CR-42741) --- plugins/terminal/resources/.zshrc | 4 +--- plugins/terminal/resources/jediterm-bash.in | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/terminal/resources/.zshrc b/plugins/terminal/resources/.zshrc index adbc7f7bc754..7829d450d948 100644 --- a/plugins/terminal/resources/.zshrc +++ b/plugins/terminal/resources/.zshrc @@ -47,15 +47,13 @@ then fi function override_jb_variables { - env | while read VARIABLE + env | while IFS="=" read NAME VALUE do - NAME=${VARIABLE%%=*} if [[ $NAME = '_INTELLIJ_FORCE_SET_'* ]] then NEW_NAME=${NAME:20} if [ -n "$NEW_NAME" ] then - VALUE=${VARIABLE#*=} export "$NEW_NAME"="$VALUE" fi fi diff --git a/plugins/terminal/resources/jediterm-bash.in b/plugins/terminal/resources/jediterm-bash.in index 78eacb5b3b86..e8cb2c66dfaf 100644 --- a/plugins/terminal/resources/jediterm-bash.in +++ b/plugins/terminal/resources/jediterm-bash.in @@ -32,15 +32,13 @@ function load_interactive_configs { } function override_jb_variables { - env | while read VARIABLE + env | while IFS="=" read NAME VALUE do - NAME=${VARIABLE%%=*} if [[ $NAME = '_INTELLIJ_FORCE_SET_'* ]] then NEW_NAME=${NAME:20} if [ -n "$NEW_NAME" ] then - VALUE=${VARIABLE#*=} export "$NEW_NAME"="$VALUE" fi fi