संपादित करें: स्पष्ट करने के लिए PyCharm 2016.3.0
यह वास्तव में अनुशंसा की जाती है कि आप बस 2016/03/01 जब तक प्रत्येक टर्मिनल सत्र के प्रारंभ में निम्न आदेश
source ~/.bash_profile
चलाने इस समाधान है कि प्रकाशित हो चूका।
हालांकि, इस बग के लिए एक कामकाज है। प्रतीत होता है कि टर्मिनल स्क्रिप्ट में 2 फ़ंक्शन नाम उलट दिए गए हैं, इसलिए उनका नाम बदला जाना चाहिए।
ऐसा करने के लिए आपको ऐप की टर्मिनल प्लगइन स्क्रिप्ट को संपादित करना होगा, जिसकी अनुशंसा नहीं की जाती है।
MacOSX पर, यह यहाँ (यकीन नहीं जहां अन्यथा) स्थित है, तो PyCharm विश्व स्तर पर स्थापित किया गया है:
cd /Applications/PyCharm.app/Contents/plugins/terminal
संपादित करें 'jediterm-bash.in' अपनी पसंद का पाठ प्रोसेसर के साथ फ़ाइल। तो इस तरह दिखना चाहिए:
#!/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
निम्नलिखित कार्य का नाम बदलें:
load_login_configs
=>load_interactive_configs
load_interactive_configs
=>load_login_configs
अंतिम स्क्रिप्ट होना चाहिए:
#!/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
PyCharm को सहेजें और पुनरारंभ करें और आपको जाने के लिए अच्छा होना चाहिए।
के संदर्भ में @Federicojama से http://stackoverflow.com/q/135688/104891 देखें। जीयूआई ऐप्स आपके '.bash_profile' को नहीं पढ़ते हैं। – CrazyCoder
ugh ... ऐसा लगता है कि ओएस एक्स के प्रत्येक संस्करण को यह अलग-अलग संभालता है ... – CLJ