-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bash_profile
More file actions
26 lines (23 loc) · 1.03 KB
/
Copy path.bash_profile
File metadata and controls
26 lines (23 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# shellcheck shell=bash
# Bash behaves differently based on whether it is being used as an interactive
# login shell or an interactive non-login shell. Virtual terminals use Bash as
# an interactive login shell. Terminal emulators like gnome-terminal use Bash as
# an interactive non-login shell.
#
# When Bash detects that it is being used as an interactive login shell, it
# loads .bash_profile or .profile (if .bash_profile does not exist) but it does
# not load .bashrc.
#
# When Bash detects that it is being used as an interactive non-login shell, it
# loads .bashrc only. (Graphical desktop environments typically load .profile
# upon login.)
#
# Therefore, if we want Bash to behave the same way as an interactive login
# shell as it does as an interactive non-login shell, we must manually load
# .profile and .bashrc in this file.
#
# https://stackoverflow.com/a/415444/4297741
source "$HOME/.profile"
source "$HOME/.bashrc"
# Source private, non-pushed, local configurations, if any.
__source_if_file_exists "$HOME/.bash_profile.local"