Permalink
Browse files

use string matching instead of case matching for checking if function…

…s should be loaded, update #2385
  • Loading branch information...
1 parent 18af6b3 commit 1b36e505107f8abe587b9d50b89bffae66b1df52 @mpapis mpapis committed Feb 27, 2014
Showing with 3 additions and 8 deletions.
  1. +3 −8 scripts/base
View
@@ -104,14 +104,9 @@ load_rvm_scripts()
for entry in ${scripts[@]}
do
- case " ${rvm_base_except:-} " in
- (*[[:space:]]$entry[[:space:]]*)
- true # do not load.
- ;;
- (*)
- source "${rvm_scripts_path}/functions/$entry" || return $?
- ;;
- esac
+ [[ " ${rvm_base_except:-} " == *" $entry "* ]] ||
+ source "${rvm_scripts_path}/functions/$entry" ||
+ return $?
done
unset rvm_base_except

0 comments on commit 1b36e50

Please sign in to comment.