-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
38 lines (27 loc) · 1.41 KB
/
.bashrc
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
if [[ -z $PROFILE_LOADED ]]; then
. ~/.bash_profile # load again for non-login shells and such
fi
if [[ $- = *i* ]]; then
shopt -s extglob failglob histappend checkwinsize autocd
((${BASH_VERSINFO[0]} >= 4)) && shopt -s globstar
# TODO: make conditional based on editing-mode (note: when changing modes from .inputrc $SHELLOPTS does not recognize it)
# bind -x '"\C-\M-w":kill -WINCH $$';; # can't use -x on .inputrc
# put these here instead of .bash_profile due to issues with screen
[[ -r ~/.git-completion.bash ]] && . ~/.git-completion.bash
# detect git-aware prompt function
if [[ $(type -t __git_ps1) = function ]]; then
gitps1='$(__git_ps1)'
fi
# monochrome
# t_bold=\\[$(tput bold)\\] t_reset=\\[$(tput sgr0)\\]
# PS1="$t_reset\\n$t_bold\\u@\\h:\\w$t_reset$gitps1\\n\$(jobs_prompt)\\$ "; PS2='> '; PS3='? '; PS4='+ '
# cygwin style
t_green=\\[$(tput setaf 2)\\] t_yellow=\\[$(tput setaf 3)\\] t_reset=\\[$(tput sgr0)\\]
PS1="$t_reset\\n$t_green\\u@\\h $t_yellow\\w$t_reset$gitps1\\n\$(jobs_prompt)\\$ "; PS2='> '; PS3='? '; PS4='+ '
unalias -a; [[ -r ~/.aliasrc ]] && . ~/.aliasrc
fi
[[ -r ~/.rvm/scripts/rvm ]] && . ~/.rvm/scripts/rvm
[[ -r ~/.bashrc_local ]] && . ~/.bashrc_local
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm