2018-06-11 17:53:44 +00:00
|
|
|
#set -x # Print out all of the commands that are executing.
|
|
|
|
|
2016-04-23 18:16:23 +00:00
|
|
|
# For Windows setup
|
2017-08-10 15:46:46 +00:00
|
|
|
test -f ~/.functions && . ~/.functions
|
2017-03-23 01:21:59 +00:00
|
|
|
test -f ~/.aliases && . ~/.aliases
|
2017-04-25 16:01:34 +00:00
|
|
|
test -f ~/.private-dotfiles/env && . ~/.private-dotfiles/env
|
2017-05-02 22:00:39 +00:00
|
|
|
test -f ~/.env.platform && . ~/.env.platform
|
2017-04-07 16:08:45 +00:00
|
|
|
|
2016-05-23 03:39:23 +00:00
|
|
|
# Unbreak broken, non-colored terminal
|
|
|
|
export TERM=xterm-256color
|
2017-04-07 16:08:45 +00:00
|
|
|
|
2017-04-21 17:35:26 +00:00
|
|
|
# Don't use ^D to exit
|
|
|
|
set -o ignoreeof
|
|
|
|
|
2017-03-27 18:30:58 +00:00
|
|
|
# Needed for mingw32
|
|
|
|
export PATH=$HOME/bin/:$HOME/.dotfiles/bin:$PATH
|
2017-04-07 16:08:45 +00:00
|
|
|
|
2017-04-21 17:35:26 +00:00
|
|
|
# TMP and TEMP are defined in the Windows environment. Leaving them set to the default
|
|
|
|
# Windows temporary directory can have unexpected consequences.
|
|
|
|
export TMP=/tmp
|
|
|
|
export TEMP=/tmp
|
|
|
|
export TMPDIR=/tmp
|
|
|
|
|
2017-07-17 16:07:02 +00:00
|
|
|
# Customize the shell prompt
|
2017-06-13 14:22:13 +00:00
|
|
|
parse_git_branch() {
|
2018-06-11 17:53:44 +00:00
|
|
|
if [[ "$PWD" != "$HOME" ]]; then
|
|
|
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
|
|
|
fi
|
2017-06-13 14:22:13 +00:00
|
|
|
}
|
|
|
|
export PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \w\[\033[33m\]\n$(parse_git_branch)\[\033[0;32m\]\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] '
|
|
|
|
|
2017-07-17 16:07:02 +00:00
|
|
|
# Git autocompletion
|
|
|
|
# Git bash file can be downloaded with: `curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash`
|
|
|
|
if [ -f ~/.git-completion.bash ]; then
|
|
|
|
. ~/.git-completion.bash
|
|
|
|
|
|
|
|
# Git autocompletion fixes for bash aliases
|
|
|
|
__git_complete g __git_main
|
|
|
|
__git_complete gco _git_checkout
|
2017-07-19 18:07:40 +00:00
|
|
|
__git_complete gl _git_branch
|
|
|
|
__git_complete gll _git_branch
|
|
|
|
__git_complete gsh _git_branch
|
|
|
|
__git_complete gbd _git_branch
|
2017-07-24 21:41:43 +00:00
|
|
|
__git_complete gpo _git_branch
|
|
|
|
__git_complete grb _git_branch
|
2017-07-17 16:07:02 +00:00
|
|
|
__git_complete gm _git_merge
|
|
|
|
__git_complete gmff _git_merge
|
|
|
|
__git_complete gmnff _git_merge
|
|
|
|
fi
|
|
|
|
|
2017-02-18 18:05:08 +00:00
|
|
|
cd ~
|