mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Use command
to run rbenv rehash
In the event that `eval "$(rbenv init -)"` is called from a function named rbenv (which I do to get rbenv to load lazily in my shell), evaluating the phrase `rbenv rehash` will cause the outer function to run again (causing an infinite loop). This change makes it clear you want the command named rbenv and not a function which may exist in the environment.
This commit is contained in:
parent
7e0e85bdda
commit
c9a96c9f79
2 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ if [ -r "$completion" ]; then
|
|||
fi
|
||||
|
||||
if [ -z "$no_rehash" ]; then
|
||||
echo 'rbenv rehash 2>/dev/null'
|
||||
echo 'command rbenv rehash 2>/dev/null'
|
||||
fi
|
||||
|
||||
commands=(`rbenv-commands --sh`)
|
||||
|
|
|
@ -14,7 +14,7 @@ load test_helper
|
|||
@test "auto rehash" {
|
||||
run rbenv-init -
|
||||
assert_success
|
||||
assert_line "rbenv rehash 2>/dev/null"
|
||||
assert_line "command rbenv rehash 2>/dev/null"
|
||||
}
|
||||
|
||||
@test "setup shell completions" {
|
||||
|
|
Loading…
Reference in a new issue