mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #986 from jeffkowalski/fix_init
Prefer 'set' over 'setenv' for fish shell
This commit is contained in:
commit
755c820724
2 changed files with 4 additions and 4 deletions
|
@ -86,8 +86,8 @@ mkdir -p "${RBENV_ROOT}/"{shims,versions}
|
|||
|
||||
case "$shell" in
|
||||
fish )
|
||||
echo "setenv PATH '${RBENV_ROOT}/shims' \$PATH"
|
||||
echo "setenv RBENV_SHELL $shell"
|
||||
echo "set -gx PATH '${RBENV_ROOT}/shims' \$PATH"
|
||||
echo "set -gx RBENV_SHELL $shell"
|
||||
;;
|
||||
* )
|
||||
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'
|
||||
|
|
4
test/init.bats
Normal file → Executable file
4
test/init.bats
Normal file → Executable file
|
@ -73,7 +73,7 @@ OUT
|
|||
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin"
|
||||
run rbenv-init - fish
|
||||
assert_success
|
||||
assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH"
|
||||
assert_line 0 "set -gx PATH '${RBENV_ROOT}/shims' \$PATH"
|
||||
}
|
||||
|
||||
@test "can add shims to PATH more than once" {
|
||||
|
@ -87,7 +87,7 @@ OUT
|
|||
export PATH="${RBENV_ROOT}/shims:$PATH"
|
||||
run rbenv-init - fish
|
||||
assert_success
|
||||
assert_line 0 "setenv PATH '${RBENV_ROOT}/shims' \$PATH"
|
||||
assert_line 0 "set -gx PATH '${RBENV_ROOT}/shims' \$PATH"
|
||||
}
|
||||
|
||||
@test "outputs sh-compatible syntax" {
|
||||
|
|
Loading…
Reference in a new issue