2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
# The best editor
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-15 17:05:36 +00:00
|
|
|
export EDITOR=vim
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
|
2015-01-14 11:12:25 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
# Make less use visual bell
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
export LESS="-qr"
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
# Update the path with local overrides
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
export PATH=/usr/local/bin:/usr/local/sbin:${PATH}
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
# A useful prompt
|
|
|
|
#--------------------------------------------------------------------------------
|
2015-02-09 14:18:12 +00:00
|
|
|
parse_git_branch() {
|
|
|
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
|
|
|
}
|
|
|
|
export PS1="[\u@\h \W \$(parse_git_branch)]\\$ "
|
2014-12-05 18:33:16 +00:00
|
|
|
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
# Record history for longer and more dynamically
|
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
# Large history buffer
|
|
|
|
export HISTSIZE=9999
|
|
|
|
export HISTFILESIZE=9999
|
|
|
|
|
|
|
|
# Avoid duplicates in the history...
|
|
|
|
export HISTCONTROL=ignoredups:erasedups
|
|
|
|
|
|
|
|
# Append history entries...
|
|
|
|
shopt -s histappend
|
|
|
|
|
|
|
|
# After each command, save and reload history
|
|
|
|
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2015-01-29 10:04:38 +00:00
|
|
|
# OS X aliases
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-12-07 13:13:55 +00:00
|
|
|
if [ $(uname -s) = "Darwin" ]; then
|
|
|
|
alias top='top -u'
|
2015-02-04 10:54:13 +00:00
|
|
|
alias ll='ls -l'
|
2014-12-07 13:13:55 +00:00
|
|
|
fi
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
# Git aliases
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
alias githistory='git log --oneline --abbrev-commit --all --graph --decorate'
|
|
|
|
alias gitx='open -a GitX .'
|
2015-01-22 08:04:02 +00:00
|
|
|
alias gitprune='git remote prune origin'
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-15 17:05:36 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
# Set up GOPATH for Go development
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
export GOPATH=${HOME}/src/go
|
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-11 21:01:06 +00:00
|
|
|
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2015-01-27 14:41:16 +00:00
|
|
|
# Add bash completion scripts
|
|
|
|
#--------------------------------------------------------------------------------
|
|
|
|
for FILE in ~/.bash/auto_complete.d/*; do source ${FILE}; done
|
2014-11-11 21:13:52 +00:00
|
|
|
#--------------------------------------------------------------------------------
|
2014-11-12 16:58:37 +00:00
|
|
|
|
|
|
|
[ -f ~/.bashrc_local ] && source ~/.bashrc_local
|