Merge pull request #1220 from romanlevin/patch-1

Fix fish shell initialization
This commit is contained in:
Mislav Marohnić 2020-02-17 23:50:04 +01:00 committed by GitHub
commit c6324ff45a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -70,7 +70,7 @@ if [ -z "$print" ]; then
echo echo
case "$shell" in case "$shell" in
fish ) fish )
echo 'status --is-interactive; and source (rbenv init -|psub)' echo 'status --is-interactive; and rbenv init - | source'
;; ;;
* ) * )
echo 'eval "$(rbenv init -)"' echo 'eval "$(rbenv init -)"'
@ -114,7 +114,7 @@ function rbenv
switch "\$command" switch "\$command"
case ${commands[*]} case ${commands[*]}
source (rbenv "sh-\$command" \$argv|psub) rbenv "sh-\$command" \$argv|source
case '*' case '*'
command rbenv "\$command" \$argv command rbenv "\$command" \$argv
end end

View file

@ -54,7 +54,7 @@ OUT
@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 source (rbenv init -|psub)' assert_line 'status --is-interactive; and rbenv init - | source'
} }
@test "option to skip rehash" { @test "option to skip rehash" {