Created
August 21, 2009 18:38
-
-
Save defunkt/172292 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
# put this in ~/.bash_profile or whatever | |
ruby_or_irb () { | |
if [ "$1" == "" ]; then | |
irb | |
else | |
ruby "$@" | |
fi | |
} | |
alias ruby="ruby_or_irb" |
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
# now `ruby` on its own launches irb | |
$ ruby -e "puts :hi" | |
hi | |
$ ruby -rubygems -e "puts :hi" | |
hi | |
$ ruby | |
>> :woot | |
=> :woot | |
# want to pass crap to your session? use irb | |
$ irb -rubygems | |
>> :tada | |
=> :tada |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment