3 function load_login_configs {
4 # When bash is invoked as an interactive login shell, or as a non-interac-
5 # tive shell with the --login option, it first reads and executes commands
6 # from the file /etc/profile, if that file exists. After reading that
7 # file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in
8 # that order, and reads and executes commands from the first one that
9 # exists and is readable.
11 if [ -f /etc/profile ]; then
15 if [ -f ~/.bash_profile ]; then
16 source ~/.bash_profile
18 if [ -f ~/.bash_login ]; then
21 if [ -f ~/.profile ]; then
28 function load_interactive_configs {
29 if [ -f ~/.bashrc ]; then
34 if [ -n $LOGIN_SHELL ]; then
39 load_interactive_configs
41 # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
42 bind '"\e\e[C":forward-word'
43 bind '"\e\e[D": backward-word'
44 bind '"\e\O[C":forward-word'
45 bind '"\e\O[D": backward-word'
47 function generate_command_executed_sequence() {
51 export -f generate_command_executed_sequence
54 #generate escape sequence after command is executed to notify jediterm emulator
55 trap "generate_command_executed_sequence" DEBUG
57 if [ -n "$JEDITERM_USER_RCFILE" ]
59 source $JEDITERM_USER_RCFILE
60 unset JEDITERM_USER_RCFILE
63 if [ -n "$JEDITERM_SOURCE" ]
65 source $JEDITERM_SOURCE