Created
October 14, 2008 00:18
-
-
Save chrislloyd/16630 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias l='ls -GlAF' | |
alias h='history' | |
alias d='cd $HOME/Desktop' | |
alias c='clear' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias rbash='source ~/.bash_profile' | |
alias ebash='$EDITOR ~/.bashrc; rbash' | |
alias er='mate app/ config/ db/ lib/ public/ spec/ stories/ vendor/plugins/ &' | |
alias eg='mate LICENSE Rakefile script/ README README.textile bin/ lib/ spec/' | |
# RAILS | |
alias ss='script/server' | |
alias sc='script/console' | |
alias a='autotest -rails' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ~/.git-completion ]; then | |
. ~/.git-completion | |
fi | |
export PATH="/opt/local/bin:/usr/local/lsws/bin:$PATH" | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
export PS1='\[\033[01;34m\]\w \[\033[01;33m\]$(parse_git_branch)\[\033[01;34m\]\[\033[34m\]$\[\033[22;39m\] ' | |
# export PS1="\e[34m\e[31m\e[2Kblue\e[0m\e[0m" | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
[ -z "$PS1" ] && return | |
export EDITOR="mate -w" | |
export LC_CTYPE=en_AU.UTF-8 | |
export PROJECTS="$HOME/Projects" | |
export PROJECT_ARCHIVE="$HOME/Development/Archive" | |
p() { | |
cd "$PROJECTS/$1" | |
} | |
p-archive() { | |
mv "$PROJECTS/$1" "$PROJECT_ARCHIVE/$1" | |
} | |
p-restore() { | |
mv "$PROJECT_ARCHIVE/$1" "$PROJECTS/$1" | |
} | |
_p() { | |
COMPREPLY=( $(compgen -W "$(ls $PROJECTS | sort | uniq | grep -vE \"^_\")" -- ${COMP_WORDS[COMP_CWORD]} ) ) | |
} | |
complete -F _p p | |
complete -F _p p-archive | |
complete -F _p p-restore | |
export GEMDIR=`gem env gemdir` | |
egem() { | |
$EDITOR $GEMDIR/gems/$1 | |
} | |
_egem() { | |
COMPREPLY=($(compgen -W "$(ls $GEMDIR/gems | sort | uniq | grep -vE \"^_\")" -- ${COMP_WORDS[COMP_CWORD]})) | |
} | |
complete -F _egem egem | |
gemdoc() { | |
open $GEMDIR/doc/`$(which ls) $GEMDIR/doc | grep $1 | sort | tail -1`/rdoc/index.html | |
} | |
_gemdocomplete() { | |
COMPREPLY=($(compgen -W '$(`which ls` $GEMDIR/doc)' -- ${COMP_WORDS[COMP_CWORD]})) | |
return 0 | |
} | |
complete -o default -o nospace -F _gemdocomplete gemdoc | |
to_lower() { | |
echo -n $1 | tr '[:upper:]' '[:lower:]' | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment