after_use_current 557 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. function set_current_alias()
  3. {
  4. typeset __current_ruby
  5. if
  6. __current_ruby="${rvm_environments_path}/current" &&
  7. [[ -L "${__current_ruby:-}" ]]
  8. then
  9. __current_ruby="$( readlink "${__current_ruby:-}" )"
  10. __current_ruby="${__current_ruby##*/}"
  11. fi
  12. if
  13. [[ -z "${__current_ruby}" || "${__current_ruby}" != "${rvm_ruby_string}" ]]
  14. then
  15. "$rvm_scripts_path/alias" create current "${rvm_ruby_string}"
  16. fi
  17. }
  18. if
  19. [[ $TM_WRAPPING != "1" ]]
  20. then
  21. export TM_WRAPPING="1"
  22. set_current_alias
  23. unset TM_WRAPPING
  24. fi