mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Base rbenv plugin on the rbenv in the path.
Rather than do our own searching, this gives the user full control of the PATH variable and of the search order for rbenv. It's also probably faster, since we let zsh do the searching for us.
This commit is contained in:
parent
1120f97305
commit
34bebc1ec5
1 changed files with 27 additions and 34 deletions
|
|
@ -1,9 +1,5 @@
|
|||
FOUND_RBENV=0
|
||||
for rbenvdir in "$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" ; do
|
||||
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
|
||||
FOUND_RBENV=1
|
||||
export RBENV_ROOT=$rbenvdir
|
||||
export PATH=${rbenvdir}/bin:$PATH
|
||||
if [[ $+commands[rbenv] -eq 1 ]] ; then
|
||||
|
||||
eval "$(rbenv init -)"
|
||||
|
||||
alias rubies="rbenv versions"
|
||||
|
|
@ -33,11 +29,8 @@ for rbenvdir in "$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" ; do
|
|||
echo "$(current_ruby)"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
done
|
||||
unset rbenvdir
|
||||
|
||||
if [ $FOUND_RBENV -eq 0 ] ; then
|
||||
else
|
||||
alias rubies='ruby -v'
|
||||
function gemsets() { echo 'not supported' }
|
||||
function rbenv_prompt_info() { echo "system: $(ruby -v | cut -f-2 -d ' ')" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue