mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Remove fish completion script
fish ships with a much more capable rbenv completion script since fish 2.0. Fixes #1212
This commit is contained in:
parent
7795476af1
commit
569d464d36
3 changed files with 8 additions and 25 deletions
|
@ -1,18 +0,0 @@
|
||||||
if [[ ! -o interactive ]]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
compctl -K _rbenv rbenv
|
|
||||||
|
|
||||||
_rbenv() {
|
|
||||||
local words completions
|
|
||||||
read -cA words
|
|
||||||
|
|
||||||
if [ "${#words}" -eq 2 ]; then
|
|
||||||
completions="$(rbenv commands)"
|
|
||||||
else
|
|
||||||
completions="$(rbenv completions ${words[2,-2]})"
|
|
||||||
fi
|
|
||||||
|
|
||||||
reply=("${(ps:\n:)completions}")
|
|
||||||
}
|
|
|
@ -92,13 +92,13 @@ fish )
|
||||||
* )
|
* )
|
||||||
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
|
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
|
||||||
echo "export RBENV_SHELL=$shell"
|
echo "export RBENV_SHELL=$shell"
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
completion="${root}/completions/rbenv.${shell}"
|
completion="${root}/completions/rbenv.${shell}"
|
||||||
if [ -r "$completion" ]; then
|
if [ -r "$completion" ]; then
|
||||||
echo "source '$completion'"
|
echo "source '$completion'"
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -z "$no_rehash" ]; then
|
if [ -z "$no_rehash" ]; then
|
||||||
echo 'command rbenv rehash 2>/dev/null'
|
echo 'command rbenv rehash 2>/dev/null'
|
||||||
|
|
|
@ -43,11 +43,12 @@ OUT
|
||||||
assert_success "sh"
|
assert_success "sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "setup shell completions (fish)" {
|
@test "skip shell completions (fish)" {
|
||||||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
||||||
run rbenv-init - fish
|
run rbenv-init - fish
|
||||||
assert_success
|
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" {
|
@test "fish instructions" {
|
||||||
|
|
Loading…
Reference in a new issue