forked from CoreyMSchafer/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile.previous
executable file
·51 lines (43 loc) · 1.54 KB
/
.bash_profile.previous
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
# Add to the $PATH. Lower ones have higher priority.
export GEM_HOME="$HOME/.gem:$PATH";
export PATH="$GEM_HOME/bin:$PATH";
export PATH="/usr/bin:$PATH";
export PATH="/usr/sbin:$PATH";
export PATH="/bin:$PATH";
export PATH="/sbin:$PATH";
export PATH="/usr/local/bin:$PATH";
export PATH="/usr/local/sbin:$PATH";
export PATH="/usr/local/git/bin:$PATH";
export PATH="$HOME/bin:$PATH";
export PATH="$HOME/anaconda/bin:$PATH";
# Core Utils
# export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH";
# export MANPATH="$(brew --prefix coreutils)/libexec/gnuman:$MANPATH"
# Load the shell dotfiles, and then some:
# * ~/.private can be used for other settings you don’t want to commit.
for file in ~/.{bash_prompt,aliases,private}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
# Add tab completion for many Bash commands
if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then
source "$(brew --prefix)/share/bash-completion/bash_completion";
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion;
fi;
#Git auto-complete
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
# Auto activate conda environments
function conda_auto_env() {
if [ -e "environment.yaml" ]; then
ENV_NAME=$(head -n 1 environment.yaml | cut -f2 -d ' ')
# Check if you are already in the environment
if [[ $CONDA_PREFIX != *$ENV_NAME* ]]; then
# Try to activate environment
source activate $ENV_NAME &>/dev/null
fi
fi
}
export PROMPT_COMMAND="conda_auto_env"