summaryrefslogtreecommitdiff
path: root/bashrc
blob: 2991c107252173bcac7a8af71b22e1bec3154aae (plain)
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

# if not running interactively, don't do anything
[ -z "$PS1" ] && return

# include files
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
[ -e /usr/lib/git-core/git-sh-prompt ] && source /usr/lib/git-core/git-sh-prompt
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"


# bash options
shopt -s histappend		# append to history instead of overwriting
shopt -s checkwinsize	# check/update window dimenstions

# enable vi mode
set -o vi
bind -m vi-insert 'Control-l: clear-screen'

if [ "`id -u`" -eq 0 ]; then
	# some aliases to avoid making mistakes:
	alias rm='rm -i'
	alias cp='cp -i'
	alias mv='mv -i'
fi


# colors for ls and grep
eval "`dircolors -b`"
export LS_COLORS=$LS_COLORS'mh=44;37:' # old coloring of hardlinks
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias rgrep='rgrep --color=auto'


case "$TERM" in
	xterm*|rxvt*)
		TITLE='\[\e]0;\u@\h: \w\a\]'
		;;
	*)
		;;
esac

PS1=${TITLE}'(\[\033[1;33m\]\u\[\033[0m\]@\[\033[0;32m\]\h\[\033[0m\]) \W$(__git_ps1) \[\033[0;31m\]\\$\[\033[0m\] > '

export PATH=~/Apps/bin:$PATH
export EDITOR="/usr/bin/vim"
export SSH_ASKPASS=/usr/lib/openssh/gnome-ssh-askpass
export WINEPREFIX=$HOME/.wine/default
export SDL_AUDIODRIVER=alsa
export XDG_DATA_HOME=$HOME/.local/share
export LESS="-R -M --shift 10"

# use vim as pager (VimTip 167)
export MANPAGER="/bin/sh -c \"col -b -x | view -u ~/.vim/pager.vim -c 'set ft=man nomod nolist' -\""
export PERLDOC_PAGER=$MANPAGER