Permalink
Browse files

Moar.

  • Loading branch information...
sjl committed Sep 23, 2012
1 parent e49a09e commit 840cd45a512de7f7949fabcf5d175fc530fec203
Showing with 22 additions and 19 deletions.
  1. +22 −19 fish/config.fish
  2. BIN moom/com.manytricks.Moom.plist
View
@@ -90,20 +90,23 @@ end
# }}}
# Environment variables {{{
-set PATH "/usr/local/bin" $PATH
-set PATH "/usr/local/share/python" $PATH
-set PATH "/usr/local/sbin" $PATH
-set PATH "$HOME/bin" $PATH
-set PATH "$HOME/lib/dotfiles/bin" $PATH
-set PATH "/opt/local/bin" $PATH
-set PATH "/opt/subversion/bin" $PATH
-set PATH "$HOME/lib/hg/hg" $PATH
-
-set PATH "$HOME/Library/Haskell/bin" $PATH
-
-set PATH "/usr/local/Cellar/ruby/1.9.3-p194/bin" $PATH
-
-set PATH "/usr/local/Cellar/ruby/1.9.3-p125/bin" $PATH
+function prepend_to_path -d "Prepend the given dir to PATH if it exists and is not already in it"
+ if test -d $argv[1]
+ if not contains $argv[1] $PATH
+ set -g PATH "$argv[1]" $PATH
+ end
+ end
+end
+prepend_to_path "/usr/local/bin"
+prepend_to_path "/usr/local/share/python"
+prepend_to_path "/usr/local/sbin"
+prepend_to_path "$HOME/bin"
+prepend_to_path "$HOME/lib/dotfiles/bin"
+prepend_to_path "/opt/local/bin"
+prepend_to_path "/opt/subversion/bin"
+prepend_to_path "$HOME/lib/hg/hg"
+prepend_to_path "$HOME/Library/Haskell/bin"
+prepend_to_path "/usr/local/Cellar/ruby/1.9.3-p194/bin"
set BROWSER open
@@ -122,11 +125,11 @@ set -g -x PIP_DOWNLOAD_CACHE "$HOME/.pip/cache"
set -g -x PYTHONSTARTUP "$HOME/.pythonrc.py"
set -g -x WORKON_HOME "$HOME/lib/virtualenvs"
-set PATH $PATH "/usr/local/share/python"
-set PATH $PATH "/usr/local/Cellar/PyPi/3.6/bin"
-set PATH $PATH "/usr/local/Cellar/python/2.7.1/bin"
-set PATH $PATH "/usr/local/Cellar/python/2.7/bin"
-set PATH $PATH "/usr/local/Cellar/python/2.6.5/bin"
+prepend_to_path "/usr/local/share/python"
+prepend_to_path "/usr/local/Cellar/PyPi/3.6/bin"
+prepend_to_path "/usr/local/Cellar/python/2.7.1/bin"
+prepend_to_path "/usr/local/Cellar/python/2.7/bin"
+prepend_to_path "/usr/local/Cellar/python/2.6.5/bin"
set -g -x PYTHONPATH ""
set PYTHONPATH "$PYTHONPATH:/usr/local/lib/python2.7.1/site-packages"
Binary file not shown.

0 comments on commit 840cd45

Please sign in to comment.