#!/bin/bash

export INPUTRC=~/.dotfiles/inputrc

function short_pwd()
{ 
	local PWD=${PWD/#$HOME/\~};
	local tmp=${PWD%/*/*};
	[[ ${#tmp} -ne ${#PWD} && ${#tmp} -gt 0 ]] \
		&& echo ...${PWD:${#tmp}} \
		|| echo $PWD; 
}
export PS1='$( if [ $? = 0 ]; then echo \[\e[32m\]:-\)\ ; else echo \[\e[31m\]:-\(\ ;fi;)\[\e[0m\]\u@\h:$(short_pwd)> '

export PATH=~/bin:$PATH
export MANPATH=~/man:$MANPATH

source ~/.dotfiles/aliases

export EDITOR=/usr/bin/vim
export LSCOLORS=gxfxcxdxbxegedabagacad

source ~/.dotfiles/webkit_login

# Preserve bash history in multiple terminal windows
# http://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows
export HISTSIZE=10000
export HISTFILESIZE=10000
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"