-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbashrc
More file actions
43 lines (37 loc) · 968 Bytes
/
bashrc
File metadata and controls
43 lines (37 loc) · 968 Bytes
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
# Source alises
for a in ~/.bash/aliases/* ; do
. $a
done
# Shell options
shopt -s cmdhist
shopt -s histappend
shopt -s checkwinsize
export HISTFILESIZE=2000
export HISTSIZE=2000
# Bash completion file on OSX
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
# Bash completion on Gentoo
if [ -f /etc/profile.d/bash-completion ]; then
. /etc/profile.d/bash-completion
fi
# source custom completions
for c in ~/.bash/completion_scripts/* ; do
. $c
done
# Set the window title
case $TERM in
xterm*|rxvt*|Eterm)
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
export PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac
# Set the prompt
if [ $(type -t __git_ps1) ]; then
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] - \w$(__git_ps1)\[\033[00m\]\n\$ '
else
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi