Skip to content

Commit

Permalink
Clarify and fix issues with RVM and paths.
Browse files Browse the repository at this point in the history
Use the get-rvm alias that is defined when rvm is missing to ensure no
future issues.
  • Loading branch information
mscharley committed Apr 29, 2014
1 parent f90f305 commit 2d4c27b
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 15 deletions.
4 changes: 0 additions & 4 deletions profile
Expand Up @@ -17,10 +17,6 @@ export EDITOR="vim"
# Language setup
export LANG="en_US.UTF-8"

# Setup paths
export PATH=$HOME/bin:$HOME/.bin:$PATH

# ls colors
export LSCOLORS="ExGxFxDxCxDaDahbadEcEc"
export LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"

9 changes: 6 additions & 3 deletions zlogin
@@ -1,8 +1,5 @@
#!/bin/zsh

# Load RVM into a shell session *as a function* if it exists
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

if [[ -z $TMUX && $TERM[0,6] == "screen" ]]; then
unset USE_TMUX
fi
Expand Down Expand Up @@ -47,6 +44,12 @@ elif [[ $USE_TMUX == true ]]; then
fi
fi

# Load RVM into a shell session *as a function* if it exists
if [[ -d $HOME/.rvm ]]; then
append-path $HOME/.rvm/bin
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

if `which fortune > /dev/null`; then
fortune -as
echo
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions zsh/1.env.zsh → zsh/2.env.zsh
Expand Up @@ -5,3 +5,7 @@ if [ -f ~/.profile ]; then
. ~/.profile
fi

# Setup paths
prepend-path $HOME/bin
prepend-path $HOME/.bin

4 changes: 2 additions & 2 deletions zsh/2.rvm.zsh
@@ -1,5 +1,5 @@
#!/bin/zsh

if [[ -d $HOME/.rvm ]]; then
PATH=$PATH:$HOME/.rvm/bin
if [[ ! -d $HOME/.rvm ]]; then
alias get-rvm="\curl -sSL https://get.rvm.io | bash -s stable --ignore-dotfiles"
fi
4 changes: 3 additions & 1 deletion zsh/4.darwin.zsh
Expand Up @@ -5,4 +5,6 @@ if [[ `uname` != "Darwin" ]]; then
fi

alias ls="ls -GF"
PATH=$HOME/bin:$HOME/.bin:/usr/local/bin:$PATH
prepend-path /usr/local/bin
prepend-path /usr/sbin
prepend-path /sbin
6 changes: 6 additions & 0 deletions zsh/functions/append-path
@@ -0,0 +1,6 @@
#!/bin/zsh

if [[ -z ${path[(r)$1]} ]] ; then
path+=$1
fi

6 changes: 6 additions & 0 deletions zsh/functions/prepend-path
@@ -0,0 +1,6 @@
#!/bin/zsh

if [[ -z ${path[(r)$1]} ]] ; then
path=( $1 "$path[@]" )
fi

5 changes: 0 additions & 5 deletions zshrc
Expand Up @@ -14,8 +14,3 @@ unset i
unset f
unsetopt NULL_GLOB
unsetopt ALL_EXPORT

if [ -f ~/.zsh/login ]; then
source ~/.zsh/login
fi

0 comments on commit 2d4c27b

Please sign in to comment.