Skip to content

Commit

Permalink
Remove fish completion script
Browse files Browse the repository at this point in the history
fish ships with a much more capable rbenv completion script since fish 2.0.

Fixes #1212
  • Loading branch information
mislav committed Jan 28, 2020
1 parent 7795476 commit 569d464
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
18 changes: 0 additions & 18 deletions completions/rbenv.zsh

This file was deleted.

10 changes: 5 additions & 5 deletions libexec/rbenv-init
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ fish )
* )
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
echo "export RBENV_SHELL=$shell"

completion="${root}/completions/rbenv.${shell}"
if [ -r "$completion" ]; then
echo "source '$completion'"
fi
;;
esac

completion="${root}/completions/rbenv.${shell}"
if [ -r "$completion" ]; then
echo "source '$completion'"
fi

if [ -z "$no_rehash" ]; then
echo 'command rbenv rehash 2>/dev/null'
fi
Expand Down
5 changes: 3 additions & 2 deletions test/init.bats
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ OUT
assert_success "sh"
}

@test "setup shell completions (fish)" {
@test "skip shell completions (fish)" {
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
run rbenv-init - fish
assert_success
assert_line "source '${root}/test/../libexec/../completions/rbenv.fish'"
local line="$(grep '^source' <<<"$output")"
[ -z "$line" ] || flunk "did not expect line: $line"
}

@test "fish instructions" {
Expand Down

0 comments on commit 569d464

Please sign in to comment.