-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
54 lines (45 loc) · 1.31 KB
/
.bashrc
File metadata and controls
54 lines (45 loc) · 1.31 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
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
export LC_ALL=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE=UTF-8
printf "Initializing cmder-with-bash . . ."
. "C:/Program Files/Git/mingw64/share/git/completion/git-prompt.sh"
Yellow='\[\e[0;33m\]'
IYellow='\[\e[0;93m\]'
Purple='\[\e[0;35m\]'
Blue='\[\e[01;34m\]'
White='\[\e[01;37m\]'
Red='\[\e[01;31m\]'
IRed='\e[0;91m'
Green='\[\e[01;32m\]'
Cyan='\[\e[0;36m\]'
Reset='\[\e[00m\]'
FancyX='\342\234\227'
Lambda='\316\273'
set_prompt() {
PS1='\n'
# If root, print name in red
if [[ $EUID == 0 ]]; then
PS1+="$Red\u$Purple@\h "
else
PS1+="$Blue\u$Purple@\h "
fi
# Set this to false for faster performance in large repos:
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
branch=$(__git_ps1 " {%s}")
if [[ $(echo "$branch" | grep "[\*\+]") ]]; then
branch_color=$Red
elif [[ $(echo "$branch"| grep "[\%]") ]]; then
branch_color=$IRed
else
branch_color=$Green
fi
PS1+="$Yellow\\w$Green\n\t$branch_color$branch\n$Yellow$Lambda $Reset"
}
PROMPT_COMMAND='set_prompt'
eval $( dircolors -b $HOME/.dir_colors )
alias dir='dir --color'
alias ls='ls --color'
alias exit='printf "bye\n";touch ~/.bash_history;exit >> ~/.bash_history 2>>~/.bash_history'