Restore the original value of ZDOTDIR (IDEA-163404) pycharm/171.1316 pycharm/171.1317 webstorm/171.1315
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 28 Nov 2016 10:35:05 +0000 (11:35 +0100)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Tue, 29 Nov 2016 01:58:42 +0000 (04:58 +0300)
plugins/terminal/resources/.zshrc
plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java

index c47d6a34a83765d89ea7fe5b7e626b3b8f917174..151e0837a86249bf1541d65ee60331b4cbb91736 100644 (file)
@@ -4,6 +4,8 @@
 bindkey '^[^[[C' forward-word
 bindkey '^[^[[D' backward-word
 
 bindkey '^[^[[C' forward-word
 bindkey '^[^[[D' backward-word
 
+ZDOTDIR=$_OLD_ZDOTDIR
+
 if [ -n "$JEDITERM_USER_RCFILE" ]
 then
   source $JEDITERM_USER_RCFILE
 if [ -n "$JEDITERM_USER_RCFILE" ]
 then
   source $JEDITERM_USER_RCFILE
index ed90427205f4b89f036bd40ec8637a0b1cc5942c..e662327d989ba0be0b6a7a7cc4a8a2b1f3fcfbcc 100644 (file)
@@ -201,6 +201,7 @@ public class LocalTerminalDirectRunner extends AbstractTerminalRunner<PtyProcess
           else if (shellName.equals("zsh")) {
             String zdotdir = EnvironmentUtil.getEnvironmentMap().get(ZDOTDIR);
             if (StringUtil.isNotEmpty(zdotdir)) {
           else if (shellName.equals("zsh")) {
             String zdotdir = EnvironmentUtil.getEnvironmentMap().get(ZDOTDIR);
             if (StringUtil.isNotEmpty(zdotdir)) {
+              envs.put("_OLD_ZDOTDIR", zdotdir);
               File zshRc = new File(FileUtil.expandUserHome(zdotdir), ".zshrc");
               if (zshRc.exists()) {
                 envs.put(JEDITERM_USER_RCFILE, zshRc.getAbsolutePath());
               File zshRc = new File(FileUtil.expandUserHome(zdotdir), ".zshrc");
               if (zshRc.exists()) {
                 envs.put(JEDITERM_USER_RCFILE, zshRc.getAbsolutePath());