-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash_profile
39 lines (31 loc) · 831 Bytes
/
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
#!/bin/bash
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
git_user() {
git config --get user.name
}
git_email() {
git config --get user.email
}
# define prefix color and text
export PS1="\[\e[0m\][\[\e[1;36m\]\w\[\e[0m\]] \[\e[1;30m\]\$(parse_git_branch)\[\e[0m\]-> "
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export TERM=xterm-256color
source ~/.nvm/nvm.sh # activate nvm
#nvm use 0.11 # active node version
# load bashrc, if available
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# load aliases, if available
if [ -f ~/.aliases ]; then
source ~/.aliases
fi
# start tmux
if [ -z "$TMUX" ]; then # if tmux isnt running, start it
tmux
fi
# show configured git user
echo -e "Working as \033[40;96m$(git_user)\033[0;0m[\033[46;30m$(git_email)\033[0;0m]"