forked from simplogical/zshkit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to use new get-ruby-version function.
Also refactor to pull out common irb arguments.
- Loading branch information
1 parent
1936448
commit 76ba962
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
# Convenient. Also works in Gentoo or Ubuntu | ||
if [[ -x $(which irb$(get_ruby_version)) ]]; then | ||
alias irb='irb1.9.1 --readline -r irb/completion' | ||
# | ||
# Set up ruby | ||
# | ||
autoload -U get-ruby-version && get-ruby-version | ||
|
||
# If you alias ruby to (say) ruby 1.9, this should update irb too. | ||
# You might want to alias 'gem' here too, if you do, remember to update your path. | ||
local irb_options="--readline -r irb/completion" | ||
|
||
if [[ -x $(which irb$RUBY_VERSION) ]]; then | ||
alias irb='irb$RUBY_VERSION $irb_options' | ||
else | ||
alias irb='irb --readline -r irb/completion' | ||
alias irb="irb $irb_options" | ||
fi | ||
|
||
export RI='-f ansi --width 70' | ||
|
||
if [[ -x `which fri` ]]; then | ||
alias ri=fri | ||
fi |