Ver a proveniência

convert references to '.' to 'source' for fish shell

pull/927/head^2
Donald Merand há 10 anos
ascendente
cometimento
8b0b51a166
2 ficheiros alterados com 5 adições e 8 eliminações
  1. +3
    -6
      libexec/rbenv-init
  2. +2
    -2
      test/init.bats

+ 3
- 6
libexec/rbenv-init Ver ficheiro

@ -70,7 +70,7 @@ if [ -z "$print" ]; then
echo
case "$shell" in
fish )
echo 'status --is-interactive; and . (rbenv init -|psub)'
echo 'status --is-interactive; and source (rbenv init -|psub)'
;;
* )
echo 'eval "$(rbenv init -)"'
@ -97,10 +97,7 @@ esac
completion="${root}/completions/rbenv.${shell}"
if [ -r "$completion" ]; then
case "$shell" in
fish ) echo ". '$completion'" ;;
* ) echo "source '$completion'" ;;
esac
echo "source '$completion'"
fi
if [ -z "$no_rehash" ]; then
@ -117,7 +114,7 @@ function rbenv
switch "\$command"
case ${commands[*]}
. (rbenv "sh-\$command" \$argv|psub)
source (rbenv "sh-\$command" \$argv|psub)
case '*'
command rbenv "\$command" \$argv
end

+ 2
- 2
test/init.bats Ver ficheiro

@ -47,13 +47,13 @@ OUT
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
run rbenv-init - fish
assert_success
assert_line ". '${root}/test/../libexec/../completions/rbenv.fish'"
assert_line "source '${root}/test/../libexec/../completions/rbenv.fish'"
}
@test "fish instructions" {
run rbenv-init fish
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" {

Carregando…
Cancelar
Guardar