-
-
Save nogweii/172323 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
# put this in ~/.zshrc | |
# No alias needed! The `whence -p` does a path search. | |
function ruby() { [[ "$1" == "" ]] && irb || `whence -p ruby` $@ } |
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
# 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