Просмотр исходного кода

Prefer 'set' over 'setenv' for fish shell

The setenv function in fish shell has changed dramatically in
75600b6b53
It now conforms to the csh version, which takes at most two arguments.
In this init script, the form
    setenv PATH prepend_something $PATH
had been used, which had too many arguments.
Since setenv isn't a native command in fish, a suitable replacement is
to use the "set -gx" command, which can consume multiple arguments.
pull/927/head^2^2
Jeff Kowalski 9 лет назад
Родитель
Сommit
be2e606fbd
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      libexec/rbenv-init

+ 2
- 2
libexec/rbenv-init Просмотреть файл

@ -86,8 +86,8 @@ mkdir -p "${RBENV_ROOT}/"{shims,versions}
case "$shell" in
fish )
echo 4;setenv PATH '${RBENV_ROOT}/shims' \$PATH";
echo "setenv RBENV_SHELL $shell"
echo 9;set -gx PATH '${RBENV_ROOT}'/shims $PATH';
echo "set -gx RBENV_SHELL $shell"
;;
* )
echo 'export PATH="'${RBENV_ROOT}'/shims:${PATH}"'

Загрузка…
Отмена
Сохранить