-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbash_profile
More file actions
60 lines (45 loc) · 1.33 KB
/
bash_profile
File metadata and controls
60 lines (45 loc) · 1.33 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
55
56
57
58
59
60
# bash options (some of the options requires Bash 4.0+)
shopt -s histappend
shopt -s extglob
shopt -s cdspell
shopt -s dirspell
shopt -s cmdhist
shopt -s checkwinsize
shopt -s autocd
# Automatically trim long paths in the prompt (requires Bash 4.0+)
PROMPT_DIRTRIM=2
# git prompt support
source ~/dotfiles/git-prompt.sh
source ~/dotfiles/git-completion.bash
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM="auto"
# export PS1="\u \w \$(__git_ps1 '(%s)') \$ "
export PS1="\[\e[1;31m\]\h\[\e[m\] \[\e[1;32m\]\u\[\e[m\] \[\e[1;36m\]\w\[\e[m\] \[\e[1;33m\]\$(__git_ps1 '(%s)') \[\e[m\]\n\[\e[1;2;37m\]\$\[\e[m\] "
# colored grep
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;33'
# colored ls
export LSCOLORS='Gxfxcxdxdxegedabagacad'
# aliases
alias ls='ls -G'
alias l='ls -lah'
alias pu='pushd'
alias po='popd'
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
alias -- -='cd -'
alias please='sudo'
alias prettyjson='python -m json.tool | pygmentize -l javascript'
if [ -n "$STY" ]; then
export PS1='\[\033k\033\\\]'$PS1
fi
#Bash history settings
HISTSIZE=4000
HISTFILESIZE=8000
HISTCONTROL="erasedups:ignoreboth"
HISTTIMEFORMAT='%F %T '
PATH="/usr/local/sbin:$PATH"
test -f ~/dotfiles/bash_profile.post && source ~/dotfiles/bash_profile.post