diff --git a/libexec/rbenv-sh-rehash b/libexec/rbenv-sh-rehash index 2fcd3e4..a81dae7 100755 --- a/libexec/rbenv-sh-rehash +++ b/libexec/rbenv-sh-rehash @@ -15,11 +15,9 @@ rbenv-rehash case "$shell" in fish ) - or='; or' + # no rehash support ;; * ) - or='||' + echo "hash -r 2>/dev/null || true" ;; esac - -echo "hash -r 2>/dev/null $or true" diff --git a/test/rehash.bats b/test/rehash.bats index 54f0f4a..ba12a24 100755 --- a/test/rehash.bats +++ b/test/rehash.bats @@ -109,6 +109,6 @@ SH @test "sh-rehash in fish" { create_executable "2.0" "ruby" RBENV_SHELL=fish run rbenv-sh-rehash - assert_success "hash -r 2>/dev/null ; or true" + assert_success "" assert [ -x "${RBENV_ROOT}/shims/ruby" ] }