-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_bashrc
110 lines (86 loc) · 2.39 KB
/
_bashrc
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Check for an interactive session
[ -z "$PS1" ] && return
# Load bash colors
#. ~/.bash_colors
# Sync the system clock from the hardware clock
#sudo /home/ost/bin/sync_clock
function extract() # Handy Extract Program.
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via >extract<" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# alias ls='ls -lap --color=auto'
alias v='vim'
alias du='du -kh'
alias df='df -kTh'
alias od='od -x'
alias tree='tree -Csu'
alias t='tree -L 1'
alias t1='tree -L 1'
alias t2='tree -L 2'
alias t3='tree -L 3'
alias t4='tree -L 4'
alias tl='tree -L'
alias sl='ls -AhgG --color=auto'
alias dev='cd ~/dev'
alias tmp='cd ~/tmp'
alias ds='cd ~/dev/MAIN/domain-sandwich/'
alias ..='cd ..'
alias webshare='python -m SimpleHTTPServer'
alias gti='git'
export EDITOR=vim
export BROWSER=/usr/bin/chromium
export PATH=$PATH:/home/ost/dev/LIB/gae/
export PATH=$PATH:/home/ost/.cabal/bin
export PYTHONPATH=$PYTHONPATH:/home/ost/dev/LIB/gae/
export PYTHONPATH=$PYTHONPATH:/home/ost/dev/LIB/gae/lib/
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function promptl {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
$BLUE[$RED\$(date +%H:%M)$BLUE]\
$BLUE[$RED\w$LIGHT_GRAY:$GREEN\$(parse_git_branch)$BLUE]\
$GREEN\$ $LIGHT_GRAY"
PS2='> '
PS4='+ '
}
promptl
# With git branch
#export PS1="$Green\$(parse_git_branch)$Yellow>$Reset "
# With pwd
# export PS1="$Green\w\n$Red>$Reset "
# Minimal
#export PS1="\w $Green>$Reset "
export PATH=$PATH:~/.cabal/bin:~/.xmonad/bin