-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
executable file
·63 lines (48 loc) · 1.34 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
# UNIVERSAL
#
export OS_TYPE=$(uname -s)
export EDITOR='emacs'
export HISTSIZE=2000
export HISTFILE=~/.bash_history
export HISTTIMEFORMAT=%s
export TERM=xterm-256color
export GIT_CONFIG_NOSYSTEM=1
export VIRTUAL_ENV_DISABLE_PROMPT=1
. ~/.config/shell/git-prompt.sh
. ~/.config/shell/last_agent.sh
function tabname {
echo -n "$(echo -n $'\033]0;')$*$(echo -n $'\007')"
}
export PS1="\[\033[31m\]$OS_TYPE:bash \[\033[34m\]\w \[\033[32m\]"'$(__git_ps1 "git:%s " )'"\[\033[30m\]\`if [ \$? == 0 ]; then echo \:\); else echo \:\(; fi\` "
# OS SPECIFIC
#
if [[ $OS_TYPE == Darwin ]]
then
export PATH=~/Local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11/bin
export MANPATH=~/Local/man:$(MANPATH= manpath)
pman() {
psfile=$(mktemp)
man -t "$@" | pstopdf -i -o $psfile
mv $psfile ${psfile}.pdf
open -a /System/Applications/Preview.app ${psfile}.pdf
}
elif [[ $OS_TYPE == Linux ]]
then
# disable apt pkg command-not-found
unset command_not_found_handle
export PATH=~/Local/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11/bin
export MANPATH=~/Local/man:$(MANPATH= manpath)
# send ps file to stdout
#
pman() {
man -t "$@"
}
else
echo "unrecognized OS:" $OS_TYPE
fi
# HOST SPECIFIC
#
if [ -e ~/.shell.local ]
then
. ~/.shell.local
fi