Created
May 26, 2009 14:32
-
-
Save jjulian/118091 to your computer and use it in GitHub Desktop.
open a gem's src code in one shell command
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
# Inspired by Gembox | |
function opengem { | |
mate $GEMDIR/gems/`ls $GEMDIR/gems/|grep $1|sort|tail -1`/ | |
} | |
_opengemcomplete() { | |
COMPREPLY=($(compgen -W '$(ls $GEMDIR/gems)' -- ${COMP_WORDS[COMP_CWORD]})) | |
return 0 | |
} | |
complete -o default -o nospace -F _opengemcomplete opengem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment