Configure path on tooltip on pycharm windon terminal

I just upgrade pycharm to 2016.3.1. Before updating, I have no problem to see the current directory path on the command line in the terminal window. After the upgrade in pycharm 2016 3.1. For some reason, the entire directory path on the command line of the terminal window looks somehow corrupted 133;C;133;D;01337; RemoteHost=hawkins@pc _name.home1337;CurrentDir=/Users/hawkins/path133;MAC:path hawkins$ 133;B 133;C;133;D;01337; RemoteHost=hawkins@pc _name.home1337;CurrentDir=/Users/hawkins/path133;MAC:path hawkins$ 133;B Does anyone have experience on how to resolve this?

 MAC:path$ 133;C;133;D;01337; RemoteHost=hawkins@pc _name.home1337;CurrentDir=/Users/hawkins/path133;MAC:path hawkins$ 133;B 133;C;133;D;01337; RemoteHost=hawkins@pc _name.home1337;CurrentDir=/Users/hawkins/path133;MAC:path hawkins$ 133;B 133;C;133;D;01337; RemoteHost=hawkins@pc _name.home1337;CurrentDir=/Users/hawkins/path133;MAC:path hawkins$ 133;B 
+6
source share
6 answers

for some reason, I realized this by creating .pycharmrc for user directories and setting /usr/local/bin/bash --rcfile ~/.pycharmrc in the Tool-> Terminal section of the shell path. It seems to be fixed, but I have no idea why

 MAC: path$ cat ~/.pycharmrc exec bash 
+2
source

I had a similar problem. It turned out that my problem was with the installation of the iTerm shell. Since you noted the question [osx], I guess you could do that too.

There is a good explanation of what these strange characters mean in this answer: https://unix.stackexchange.com/a/294886/47407

I decided that I would not be able to remove Shell Integration by clearing my PROMT_COMMAND and installing PS1 again. I created a shell script called pycharm_terminal.sh with the following

 export PROMT_COMMAND= export PS1="\[\e[31m\]\u\[\e[0m\] at \[\e[33m\]\h\[\e[0m\] in \[\e[32m\]\w\[\e[0m\] at [\A] \[\033[31m\]`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[35m\]\n$ \[\033[00m\]" bash -i 

The PS1 variable can be set to everything that was before. This is what I like.

Now, in PyCharm’s settings: go to “Tools”> “Terminal” and in the “Shell Path” set the value /bin/bash <path_to_pycharm_terminal.sh> .

Now try opening a new terminal in PyCharm. It should not have these symbol control errors.

+6
source

Solution that worked for me:

  • Go to Settings> Plugins
  • Find the "Python Terminal" plugin and disable it
  • Restart PyCharm

The only negative effect that I noticed is that the automatic activation of virtualenv when starting the terminal does not work.

+6
source

This is what worked for me:

  • Created a new pycharm_terminal.sh file with a single bash -l
  • Then I set the PyCharm options: in Tools> Terminal and in the "Shell Path" set it to / bin / bash / path_to_pycharm_terminal.sh.
  • Restart PyCharm and everything works as expected

bash -l , the person is: -l Make bash act as if it had been invoked as a login shell (see INVOCATION below).

which probably means that when PyCharm launches a terminal and executes pycharm_terminal.sh using bash -l, everything in .bash_profile turns on by default

+1
source

Found this question trying to solve a similar problem for "Geany" on mac osx. I had iterm2 installed on my machine and I was getting garbage before the terminal prompt.

a similar solution proposed by KPLauritzen also works for the Geany terminal as such.

Hope this helps someone:

  • Create a shell script in the home directory using the necessary settings PS1 and CLICOLOR:

    ~ / geany_terminal.sh

    export PROMT_COMMAND = export PS1 = '[\ e [1; 32m] [\ u @ \ h \ W] \ D {% F% T} \ n \ $ [\ e [0m] 'export CLICOLOR = 1 export LSCOLORS = gxBxhxDxfxhxhxhxhxcxcx bash -i

  • Then I went to “Edit → Settings → Terminal” and installed the “Shell”: / bin / bash / Users / myusername / geany_terminal.sh

After rebooting, the Geany terminal now displays with the settings of PS1 and CLICOLOR exactly the same as I set in my .bash_profile without garbage in front.

+1
source

You can simply activate your .bash_profile

 /bin/bash --rcfile ~/.bash_profile 
0
source

Source: https://habr.com/ru/post/1261442/


All Articles