j committed 596fcea

Install fish as default shell with minimal config

Comments (0)

Files changed (4)

+syntax: glob
         test -L "$PROJECTS_HOME" || ln -s "$HOME/Dropbox/Projects" "$PROJECTS_HOME"
         test -L "$TOOLS_HOME" || ln -s "$HOME/Dropbox/Projects/dotfiles" "$TOOLS_HOME"
+    # Install fish and make it the default shell
+    if [ ! -f /usr/local/bin/fish ]; then
+        brew install fishfish
+        echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
+        chsh -s /usr/local/bin/fish
+    fi
+mkdir -p $HOME/.config $VIRTUALENVS_HOME
 # Create .hgrc and .hgrc_local files if not present
 if [ ! -f ~/.hgrc ]; then
     test -L "$HOME/$2" || ln -s "$TOOLS_HOME/$1" "$HOME/$2"
+ensure_link "fish"                             ".config/fish"
 ensure_link "hgignore"                         ".hgignore"
 ensure_link "vim"                              ".vim"
 ensure_link "vim/vimrc"                        ".vimrc"
+# Useful aliases --------------------------------------------------------------
+alias serve_this "python -m SimpleHTTPServer"
+# Environment variables -------------------------------------------------------
+set PATH "/usr/local/bin" $PATH
+prepend_to_path "/usr/local/sbin"
+prepend_to_path "/usr/local/share/python"          # Mac pip-installed binaries
+set BROWSER open
+set -g -x ARCHFLAGS "-arch x86_64"


+function prepend_to_path -d "Prepend the given dir to PATH if it exists and is not already in PATH"
+    if test -d $argv[1]
+        if not contains $argv[1] $PATH
+            set -g -x PATH "$argv[1]" $PATH
+        end
+    end