helm/zsh/aliases

63 lines
1.2 KiB
Plaintext
Raw Normal View History

2013-03-07 00:58:05 -08:00
#!/bin/bash
2013-03-03 05:49:37 -08:00
#######################
# Aliases
alias ll='ls -l'
alias la='ls -la'
alias zrc='vim ~/.zshrc'
# Directories
alias dev='cd /usr/local/dev'
alias w='cd ~/Work/'
2013-03-06 01:29:03 -08:00
alias wd='cd ~/Work/Dev/'
2013-03-03 05:49:37 -08:00
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'
2013-03-04 02:37:45 -08:00
alias gr='g r'
alias gbr='g br'
2013-03-03 05:49:37 -08:00
2013-03-04 02:37:45 -08:00
# Laravel (already provided in zsh plugin)
2013-03-03 05:49:37 -08:00
# alias artisan='php artisan'
# alias bob='php artisan bob::build'
function quick-look() {
2013-03-13 04:24:13 -07:00
(( $# > 0 )) && qlmanage -p $* &>/dev/null &
2013-03-03 05:49:37 -08:00
}
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
}