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 ~/.bash_profile ]; then
34 if [ `shopt -q login_shell` ]; then
37 load_interactive_configs
40 # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
41 bind '"\e\e[C":forward-word'
42 bind '"\e\e[D": backward-word'
43 bind '"\e\O[C":forward-word'
44 bind '"\e\O[D": backward-word'
46 function generate_command_executed_sequence() {
50 export -f generate_command_executed_sequence
53 #generate escape sequence after command is executed to notify jediterm emulator
54 trap "generate_command_executed_sequence" DEBUG