#### This file was generated by Lightning. #### #LBIN_PATH="$PWD/bin/" #only use for development LBIN_PATH="" #my code directories c () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path cd-c $@`" if [ $1 == '-test' ]; then CMD="cd '$FULL_PATH'" echo $CMD else cd "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete cd-c" c cd-g () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path gem $@`" if [ $1 == '-test' ]; then CMD="cd '$FULL_PATH'" echo $CMD else cd "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete gem" cd-g m-g () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path gem $@`" if [ $1 == '-test' ]; then CMD="mate '$FULL_PATH'" echo $CMD else mate "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete gem" m-g #open gem's doc in browser o-g () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path gem_rdoc $@`/rdoc/index.html" if [ $1 == '-test' ]; then CMD="open '$FULL_PATH'" echo $CMD else open "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete gem_rdoc" o-g #ruby core files v-r () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path vim-v-r $@`" if [ $1 == '-test' ]; then CMD="vim '$FULL_PATH'" echo $CMD else vim "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete vim-v-r" v-r #ruby core directories cd-r () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path cd-cd-r $@`" if [ $1 == '-test' ]; then CMD="cd '$FULL_PATH'" echo $CMD else cd "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete cd-cd-r" cd-r #open mac applications oa () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path open-oa $@`" if [ $1 == '-test' ]; then CMD="open -a '$FULL_PATH'" echo $CMD else open -a "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete open-oa" oa #open files when in the base directory of a ruby gem project v-g () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path vim-v-g $@`" if [ $1 == '-test' ]; then CMD="vim '$FULL_PATH'" echo $CMD else vim "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete vim-v-g" v-g #open files when in the base directory of a rails project v-rr () { if [ -z "$1" ]; then echo "No arguments given" return fi FULL_PATH="`${LBIN_PATH}lightning-full_path vim-v-rr $@`" if [ $1 == '-test' ]; then CMD="vim '$FULL_PATH'" echo $CMD else vim "$FULL_PATH" fi } complete -o default -C "${LBIN_PATH}lightning-complete vim-v-rr" v-rr