-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
.bash_profile
65 lines (61 loc) · 2.51 KB
/
.bash_profile
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# .bash_profile file
# By Balaji S. Srinivasan (balajis@stanford.edu)
#
# Concepts:
# http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
#
# 1) .bashrc is the *non-login* config for bash, run in scripts and after
# first connection.
#
# 2) .bash_profile is the *login* config for bash, launched upon first
# connection (in Ubuntu)
#
# 3) .bash_profile imports .bashrc in our script, but not vice versa.
#
# 4) .bashrc imports .bashrc_custom in our script, which can be used to
# override variables specified here.
#
# When using GNU screen:
#
# 1) .bash_profile is loaded the first time you login, and should be used
# only for paths and environmental settings
# 2) .bashrc is loaded in each subsequent screen, and should be used for
# aliases and things like writing to .bash_eternal_history (see below)
#
# Do 'man bashrc' for the long version or see here:
# http://en.wikipedia.org/wiki/Bash#Startup_scripts
#
# When Bash starts, it executes the commands in a variety of different scripts.
#
# 1) When Bash is invoked as an interactive login shell, 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.
#
# 2) When a login shell exits, Bash reads and executes commands from the
# file ~/.bash_logout, if it exists.
#
# 3) When an interactive shell that is not a login shell is started
# (e.g. a GNU screen session), Bash reads and executes commands from
# ~/.bashrc, if that file exists. This may be inhibited by using the
# --norc option. The --rcfile file option will force Bash to read and
# execute commands from file instead of ~/.bashrc.
## -----------------------
## -- 1) Import .bashrc --
## -----------------------
# Factor out all repeated profile initialization into .bashrc
# - All non-login shell parameters go there
# - All declarations repeated for each screen session go there
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# Configure PATH
# - These are line by line so that you can kill one without affecting the others.
# - Lowest priority first, highest priority last.
export PATH=$PATH
export PATH=$HOME/bin:$PATH
export PATH=/usr/bin:$PATH
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=/usr/local/heroku/bin:$PATH # Heroku: https://toolbelt.heroku.com/standalone