#!/bin/bash ####################### # Aliases alias ll='ls -l' alias la='ls -la' alias zrc='vim ~/.zshrc' # Directories alias dev='cd /usr/local/dev' alias w='cd ~/Work/' alias wd='cd ~/Work/Dev/' alias wp='cd ~/Work/Projects/' # Vim alias v='mvim' # Git alias g='git' alias ga='g a' alias gap='g a -p' alias gc='g c' alias gs='g s' alias gd='g d' alias gr='g r' alias gbr='g br' # Laravel (already provided in zsh plugin) # alias artisan='php artisan' # alias bob='php artisan bob::build' function quick-look() { (( $# > 0 )) && qlmanage -p $* &>/dev/null & } function update() { # Update homebrew brew update brew upgrade # Keep sudo alive sudo -v while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Make sure rvm is sourced properly if [ -f ~/.rvm/scripts/rvm ]; then [ "$(type -t rvm)" = "function" ] || source ~/.rvm/scripts/rvm fi # Update all rubies and rubygems for v in 1.9.3 1.8.7 system; do rvm use $v gem update --system gem update done # Update vim echo "[NOTICE] Updating vim..." screen -d -m vim +BundleInstall! +BundleClean! +q +q }