.tmux.conf: default-term 'screen-256color'
[dotfiles.git] / .bash_profile
index 0b6071af2484c55173a9f5db776e69a603f6b8b9..aa883acff9c74b0776bb28c3a6bb0fc18129ee21 100644 (file)
@@ -11,8 +11,9 @@ if [ "$UNAME" = "Cygwin" ]; then
 fi
 
 # keychain
-keychain="$(type -P keychain)"
-test -n "$keychain" && {
+keychain=$(type -P keychain)
+test -n "$keychain" && \
+  test -z "$SUDO_USER" && {
   if [ -f ~/.ssh/id_rsa ]; then
     eval `$keychain -q ~/.ssh/id_rsa`
     source ~/.keychain/`hostname`-sh > /dev/null
@@ -20,5 +21,7 @@ test -n "$keychain" && {
 }
 unset keychain
 
-# Load RVM function
-[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
+# rbenv
+rbenv=$(type -P rbenv)
+test -n "$rbenv" && eval "$(rbenv init -)"
+unset rbenv