Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions share/chruby/chruby.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
CHRUBY_VERSION="0.3.9"
RUBIES=()

for dir in "$PREFIX/opt/rubies" "$HOME/.rubies"; do
[[ -d "$dir" && -n "$(command ls -A "$dir")" ]] && RUBIES+=("$dir"/*)
done
unset dir
function chruby_discover()
{
RUBIES=()
local dir
for dir in "$PREFIX/opt/rubies" "$HOME/.rubies"; do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shell script must be hard-tab indented.

[[ -d "$dir" && -n "$(command ls -A "$dir")" ]] && RUBIES+=("$dir"/*)
done
}

function chruby_reset()
{
Expand Down Expand Up @@ -102,3 +105,5 @@ function chruby()
;;
esac
}

chruby_discover