-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc
64 lines (52 loc) · 1.31 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
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
. $HOME/.bash_aliases
. $HOME/.bash_colors
PS1="\[$Green\]\u\[$BIWhite\]@\[$Purple\]\h: \[$BBlue\]\w \[$Cyan\]\\$\[$Color_Off\] "
export LESS="-R"
export EDITOR='vim'
eval $(dircolors -b)
shopt -s extglob
extract() {
local c e i
(($#)) || return
for i; do
c=''
e=1
if [[ ! -r $i ]]; then
echo "$0: file is unreadable: \`$i'" >&2
continue
fi
case $i in
*.t@(gz|lz|xz|b@(2|z?(2))|a@(z|r?(.@(Z|bz?(2)|gz|lzma|xz)))))
c='bsdtar xvf';;
*.7z) c='7z x';;
*.Z) c='uncompress';;
*.bz2) c='bunzip2';;
*.exe) c='cabextract';;
*.gz) c='gunzip';;
*.rar) c='unrar x';;
*.xz) c='unxz';;
*.zip) c='unzip';;
*) echo "$0: unrecognized file extension: \`$i'" >&2
continue;;
esac
command $c "$i"
e=$?
done
return $e
}
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;37m") \
LESS_TERMCAP_md=$(printf "\e[1;37m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;47;30m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[0;36m") \
man "$@"
}