Permalink
Browse files

rejigger bash and zsh vs .profile

  • Loading branch information...
1 parent 33d8e38 commit 7ef05fac7e61d11391e28ffa5efaf9645386b42c @lanej lanej committed Jun 19, 2013
Showing with 25 additions and 43 deletions.
  1. +23 −0 bash/bash_profile
  2. +2 −33 bash/bashrc
  3. +0 −10 zsh/zshrc
View
@@ -8,11 +8,34 @@ if [ -n "$BASH_VERSION" ]; then
fi
fi
+## set PATH so it includes user's private bin if it exists
+if [[ -d "$HOME/bin" ]] ; then
+ PATH="$HOME/bin:$PATH"
+fi
+
+if [[ -d "$HOME/.files/bin" ]] ; then
+ PATH="$HOME/.files/bin:$PATH"
+fi
+
+export PATH="$HOME/sbin:/usr/local/bin:$PATH:/usr/local/git/bin/:/usr/local/sbin"
+
# Ruby tweaks
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_FREE_MIN=500000
export RUBY_HEAP_MIN_SLOTS=40000
export HISTFILESIZE=9999
export HISTSIZE=9999
+## Editor
+if [[ -s $(which mvim) ]]; then
+ export EDITOR=mvim
+else
+ export EDITOR=vim
+fi
+
+## alias
+if [[ -s "$HOME/.alias" ]]; then
+ source "$HOME/.alias"
+fi
+
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
View
@@ -1,45 +1,16 @@
#!/usr/bin/env sh
-## RVM
-if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi
-
-## set PATH so it includes user's private bin if it exists
-if [[ -d "$HOME/bin" ]] ; then
- PATH="$HOME/bin:$PATH"
-fi
-
-if [[ -d "$HOME/.files/bin" ]] ; then
- PATH="$HOME/.files/bin:$PATH"
-fi
-
-PATH="$HOME/sbin:$HOME/bin:$PATH"
-
## source cinderella bash completions
if [[ -d "$HOME/etc/bash_completion.d" ]] ; then
source $HOME/etc/bash_completion.d/*.bash
fi
-## Editor
-if [[ -s $(which mvim) ]]; then
- export EDITOR=mvim
-else
- export EDITOR=vim
-fi
-
-## PATH
-PATH=/usr/local/bin:$PATH:/usr/local/git/bin/:/usr/local/sbin
-
## Set ls options per platform
if [[ $OSTYPE == 'linux-gnu' ]]; then
alias ls='ls -p --color=auto'
elif [[ $OSTYPE == 'darwin10.0' ]]; then
alias ls='ls -Gp'
fi
-## alias
-if [[ -s "$HOME/.alias" ]]; then
- source "$HOME/.alias"
-fi
-
## Functions
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != *"nothing to commit"* ]] && echo "*"
@@ -54,17 +25,15 @@ if [[ -n "${SSH_CONNECTION+x}" ]]; then
else
export PS1="\W \$(parse_git_branch)\$ "
fi
+
RVM_PROMPT=$(which rvm-prompt 2>/dev/null);
+
if [[ -s $RVM_PROMPT ]]; then
export PS1="\$($RVM_PROMPT v g) $PS1"
fi
-export rvm_project_rvmrc=1
if [[ -s $(which keychain 2>/dev/null) ]]; then
keychain ~/.ssh/id_rsa
fi
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
-
-# homebrew git
-PATH="/usr/local/bin:$PATH"
View
@@ -36,18 +36,8 @@ plugins=(git rails ruby battery brew github history-substring-search osx pow pow
source $ZSH/oh-my-zsh.sh
-# Customize to your needs...
-#
setopt inc_append_history
setopt share_history
unsetopt correct
unsetopt correct_all
-
-export PATH=/Users/jlane/bin:/usr/local/sbin:/usr/local/bin:/Users/jlane/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:$PATH
-
-source ~/.alias
-
-[[ -s /Users/jlane/.rvm/scripts/rvm ]] && source /Users/jlane/.rvm/scripts/rvm # Load RVM into a shell session *as a function*
-
-PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

0 comments on commit 7ef05fa

Please sign in to comment.