-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc_common
81 lines (76 loc) · 2.52 KB
/
.bashrc_common
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
#Common accross all hosts
# colors for ls, etc.
#eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"
PATH=${PATH}:/sbin:/usr/sbin:$HOME/bin:/usr/local/bin:/home/kkress/.cargo/bin
HISTFILESIZE=5000
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
shopt -s histappend
#from http://vim.wikia.com/wiki/256_colors_in_vim
if [ "$TERM" = "xterm" ] ; then
if [ -z "$COLORTERM" ] ; then
if [ -z "$XTERM_VERSION" ] ; then
echo "Warning: Terminal wrongly calling itself 'xterm'."
else
case "$XTERM_VERSION" in
"XTerm(256)") TERM="xterm-256color" ;;
"XTerm(88)") TERM="xterm-88color" ;;
"XTerm") ;;
*)
echo "Warning: Unrecognized XTERM_VERSION: $XTERM_VERSION"
;;
esac
fi
else
case "$COLORTERM" in
gnome-terminal)
# Those crafty Gnome folks require you to check COLORTERM,
# but don't allow you to just *favor* the setting over TERM.
# Instead you need to compare it and perform some guesses
# based upon the value. This is, perhaps, too simplistic.
TERM="gnome-256color"
;;
*)
echo "Warning: Unrecognized COLORTERM: $COLORTERM"
;;
esac
fi
fi
SCREEN_COLORS="`tput colors`"
if [ -z "$SCREEN_COLORS" ] ; then
case "$TERM" in
screen-*color-bce)
echo "Unknown terminal $TERM. Falling back to 'screen-bce'."
export TERM=screen-bce
;;
*-88color)
echo "Unknown terminal $TERM. Falling back to 'xterm-88color'."
export TERM=xterm-88color
;;
*-256color)
echo "Unknown terminal $TERM. Falling back to 'xterm-256color'."
export TERM=xterm-256color
;;
esac
SCREEN_COLORS=`tput colors`
fi
if [ -z "$SCREEN_COLORS" ] ; then
case "$TERM" in
gnome*|xterm*|konsole*|aterm|[Ee]term)
echo "Unknown terminal $TERM. Falling back to 'xterm'."
export TERM=xterm
;;
rxvt*)
echo "Unknown terminal $TERM. Falling back to 'rxvt'."
export TERM=rxvt
;;
screen*)
echo "Unknown terminal $TERM. Falling back to 'screen'."
export TERM=screen
;;
esac
SCREEN_COLORS=`tput colors`
fi
#PS1="\[\033[1;36m\]\u@\h: \[\033[0m\]\A \w>"