mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
convert references to '.' to 'source' for fish shell
This commit is contained in:
parent
ad7dfa63ab
commit
8b0b51a166
2 changed files with 5 additions and 8 deletions
|
@ -70,7 +70,7 @@ if [ -z "$print" ]; then
|
||||||
echo
|
echo
|
||||||
case "$shell" in
|
case "$shell" in
|
||||||
fish )
|
fish )
|
||||||
echo 'status --is-interactive; and . (rbenv init -|psub)'
|
echo 'status --is-interactive; and source (rbenv init -|psub)'
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
echo 'eval "$(rbenv init -)"'
|
echo 'eval "$(rbenv init -)"'
|
||||||
|
@ -97,10 +97,7 @@ esac
|
||||||
|
|
||||||
completion="${root}/completions/rbenv.${shell}"
|
completion="${root}/completions/rbenv.${shell}"
|
||||||
if [ -r "$completion" ]; then
|
if [ -r "$completion" ]; then
|
||||||
case "$shell" in
|
echo "source '$completion'"
|
||||||
fish ) echo ". '$completion'" ;;
|
|
||||||
* ) echo "source '$completion'" ;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$no_rehash" ]; then
|
if [ -z "$no_rehash" ]; then
|
||||||
|
@ -117,7 +114,7 @@ function rbenv
|
||||||
|
|
||||||
switch "\$command"
|
switch "\$command"
|
||||||
case ${commands[*]}
|
case ${commands[*]}
|
||||||
. (rbenv "sh-\$command" \$argv|psub)
|
source (rbenv "sh-\$command" \$argv|psub)
|
||||||
case '*'
|
case '*'
|
||||||
command rbenv "\$command" \$argv
|
command rbenv "\$command" \$argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -47,13 +47,13 @@ OUT
|
||||||
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 ". '${root}/test/../libexec/../completions/rbenv.fish'"
|
assert_line "source '${root}/test/../libexec/../completions/rbenv.fish'"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "fish instructions" {
|
@test "fish instructions" {
|
||||||
run rbenv-init fish
|
run rbenv-init fish
|
||||||
assert [ "$status" -eq 1 ]
|
assert [ "$status" -eq 1 ]
|
||||||
assert_line 'status --is-interactive; and . (rbenv init -|psub)'
|
assert_line 'status --is-interactive; and source (rbenv init -|psub)'
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "option to skip rehash" {
|
@test "option to skip rehash" {
|
||||||
|
|
Loading…
Reference in a new issue