Created
March 19, 2010 03:35
-
-
Save davidlee/337198 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# gem completions | |
# this is a guess. salt to taste. | |
export GEM_SEARCH_PATH=`ruby -e 'require "rubygems"; puts Gem.path.first'`/gems | |
# completion fuction for compdef: just lists the gems folders | |
_gems() { compadd `cd $GEM_SEARCH_PATH; echo *` } | |
compdef _gems gemcd ; gemcd() { cd $GEM_SEARCH_PATH/$1 } | |
compdef _gems gemedit ; gemedit() { mate $GEM_SEARCH_PATH/$1 } | |
compdef _gems gemgrep ; gemgrep() { grep -r $1 $GEM_SEARCH_PATH/$2 } | |
compdef _gems gemrak ; gemrak() { rak $1 $GEM_SEARCH_PATH/$2 } | |
alias gme="gemedit $1" | |
alias gmc="gemcd $1" | |
alias gmr="gemrak $1 $2" | |
alias ghe="ghedit $1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment