Permalink
Browse files

Feature: IRB prompt mode is now stored in :RVM instead of :DEFAULT.

  • Loading branch information...
1 parent 3ac97de commit f743615fdb327217004d849dc777897f2492d23a @wayneeseguin wayneeseguin committed Oct 28, 2009
Showing with 22 additions and 33 deletions.
  1. +20 −30 scripts/cli
  2. +2 −3 scripts/utility
View
@@ -444,47 +444,37 @@ function rvm {
if [[ -z "$rvm_trace_flag" ]] ; then set +x ; else set -x ; fi
result=0
case "$rvm_action" in
- use) __rvm_use ; result=$? ;; gemdir) __rvm_gemdir ; result=$? ;;
- gemdup) __rvm_gemdup ; result=$? ;;
- srcdir) __rvm_source_dir ; result=$? ;;
- list) __rvm_list ; result=$? ;;
- version) __rvm_version ; result=$? ;;
- reset) __rvm_reset ; result=$? ;;
- # TODO: how can we use bin_path here for reload, default file?
- implode) __rvm_implode ; result=$? ;;
- update) __rvm_update ; result=$? ;;
- readline) __rvm_readline_install ; result=$? ;;
- reboot) __rvm_reboot ; result=$? ;;
- usage|help) __rvm_usage ; result=$? ;;
- benchmark) __rvm_benchmark ; result=$? ;;
- inspect) __rvm_inspect ; result=$? ;;
- gems) __rvm_gems ; result=$? ;;
- remove) __rvm_remove_ruby ; result=$? ;;
- ruby|gem|rake) __rvm_do ; result=$? ;;
- reload)
- source "$rvm_path/scripts/rvm"
- ;;
+ use) __rvm_use ; result=$? ;;
+ gemdir) __rvm_gemdir ; result=$? ;;
+ gemdup) __rvm_gemdup ; result=$? ;;
+ srcdir) __rvm_source_dir ; result=$? ;;
+ list) __rvm_list ; result=$? ;;
+ version) __rvm_version ; result=$? ;;
+ reset) __rvm_reset ; result=$? ;;
+ implode) __rvm_implode ; result=$? ;;
+ update) __rvm_update ; result=$? ;;
+ readline) __rvm_readline_install ; result=$? ;;
+ reboot) __rvm_reboot ; result=$? ;;
+ usage|help) __rvm_usage ; result=$? ;;
+ benchmark) __rvm_benchmark ; result=$? ;;
+ inspect) __rvm_inspect ; result=$? ;;
+ gems) __rvm_gems ; result=$? ;;
+ remove) __rvm_remove_ruby ; result=$? ;;
+ ruby|gem|rake) __rvm_do ; result=$? ;;
+ reload) source "$rvm_path/scripts/rvm" ;;
+ install|uninstall) __rvm_manage_rubies ; result=$? ;;
+ tests|specs) rvm_action="rake" ; __rvm_do ; result=$? ;;
iconv|openssl|ncurses|zlib|readline)
__rvm_${rvm_action}_install
result=$?
;;
- install|uninstall)
- __rvm_manage_rubies
- result=$?
- ;;
-
gemsync)
rvm_source_gem_path=$(__rvm_select ; echo $rvm_ruby_gem_home)
__rvm_gem_sync
;;
- tests|specs)
- rvm_action="rake"
- __rvm_do
- ;;
-
info|debug)
__rvm_version
__rvm_info
View
@@ -715,9 +715,8 @@ IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
:RETURN => " => %s \n",
:AUTO_INDENT => true
}
-@prompt_mode = :DEFAULT
-IRB.conf[:PROMPT][@prompt_mode] = @prompt
-IRB.conf[:PROMPT_MODE] = @prompt_mode
+IRB.conf[:PROMPT][:RVM] = @prompt
+IRB.conf[:PROMPT_MODE] = :RVM
load '$HOME/.irbrc' if File.exists?('$HOME/.irbrc') rescue nil

0 comments on commit f743615

Please sign in to comment.