Edit: chiarendo che questa soluzione è per PyCharm 2016.3.0
E 'davvero consigliabile che basta eseguire il seguente comando
source ~/.bash_profile
all'inizio di ogni sessione di terminale fino 2016/03/01 è rilasciato.
Tuttavia, esiste un rimedio per questo errore. Lo script del terminale sembra avere 2 nomi di funzione invertiti, quindi devono essere rinominati.
Per eseguire questa operazione, è necessario modificare lo script del plug-in del terminale dell'app, che NON è consigliato.
Su MacOSX, questo si trova qui se PyCharm è installato a livello mondiale (non sono sicuro dove diversamente):
cd /Applications/PyCharm.app/Contents/plugins/terminal
Modificare il file 'jediterm-bash.in' con il processore di testo di vostra scelta. Se dovrebbe essere simile a questo:
#!/bin/bash
function load_login_configs {
# When bash is invoked as an interactive login shell, or as a non-interac-
# tive shell with the --login option, it first reads and executes commands
# from the file /etc/profile, if that file exists. After reading that
# file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in
# that order, and reads and executes commands from the first one that
# exists and is readable.
if [ -f /etc/profile ]; then
source /etc/profile
fi
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
else
if [ -f ~/.bash_login ]; then
source ~/.bash_login
else
if [ -f ~/.profile ]; then
source ~/.profile
fi
fi
fi
}
function load_interactive_configs {
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
}
if [ `shopt -q login_shell` ]; then
load_login_configs
fi
load_interactive_configs
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
bind '"\e\e[C":forward-word'
bind '"\e\e[D": backward-word'
bind '"\e\O[C":forward-word'
bind '"\e\O[D": backward-word'
function generate_command_executed_sequence() {
printf '\e\7'
}
export -f generate_command_executed_sequence
#generate escape sequence after command is executed to notify jediterm emulator
trap "generate_command_executed_sequence" DEBUG
if [ -n "$JEDITERM_USER_RCFILE" ]
then
source $JEDITERM_USER_RCFILE
fi
if [ -n "$JEDITERM_SOURCE" ]
then
source $JEDITERM_SOURCE
fi
Rinominare le seguenti funzioni:
load_login_configs
=>load_interactive_configs
load_interactive_configs
=>load_login_configs
Lo script finale dovrebbe essere:
#!/bin/bash
function load_interactive_configs {
# When bash is invoked as an interactive login shell, or as a non-interac-
# tive shell with the --login option, it first reads and executes commands
# from the file /etc/profile, if that file exists. After reading that
# file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in
# that order, and reads and executes commands from the first one that
# exists and is readable.
if [ -f /etc/profile ]; then
source /etc/profile
fi
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
else
if [ -f ~/.bash_login ]; then
source ~/.bash_login
else
if [ -f ~/.profile ]; then
source ~/.profile
fi
fi
fi
}
function load_login_configs {
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
}
if [ `shopt -q login_shell` ]; then
load_login_configs
fi
load_interactive_configs
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
bind '"\e\e[C":forward-word'
bind '"\e\e[D": backward-word'
bind '"\e\O[C":forward-word'
bind '"\e\O[D": backward-word'
function generate_command_executed_sequence() {
printf '\e\7'
}
export -f generate_command_executed_sequence
#generate escape sequence after command is executed to notify jediterm emulator
trap "generate_command_executed_sequence" DEBUG
if [ -n "$JEDITERM_USER_RCFILE" ]
then
source $JEDITERM_USER_RCFILE
fi
if [ -n "$JEDITERM_SOURCE" ]
then
source $JEDITERM_SOURCE
fi
Salva e riavvia PyCharm e dovresti essere pronto.
Fare riferimento a http://stackoverflow.com/q/135688/104891. Le app della GUI non leggono il tuo '.bash_profile'. – CrazyCoder
ugh ... sembra che ogni versione di OS X gestisca diversamente ... – CLJ