瀏覽代碼

fix fish prompt

pull/475/head
romir kulshrestha 7 月之前
父節點
當前提交
9d0e422d3f
無法提取簽署
共有 2 個檔案被更改,包括 15 行新增2 行删除
  1. +8
    -1
      bin/pyenv-sh-activate
  2. +7
    -1
      bin/pyenv-sh-deactivate

+ 8
- 1
bin/pyenv-sh-activate 查看文件

@ -245,7 +245,14 @@ if [ -z "${PYENV_VIRTUALENV_DISABLE_PROMPT}" ]; then
case "${shell}" in
fish )
if [ -z "${QUIET}" ]; then
echo "pyenv-virtualenv: prompt changing not working for fish." 1>&2
cat <<EOS
functions -e _pyenv_old_prompt
functions -c fish_prompt _pyenv_old_prompt
function fish_prompt
echo -n "(${venv}) "
_pyenv_old_prompt
end
EOS
fi
;;
* )

+ 7
- 1
bin/pyenv-sh-deactivate 查看文件

@ -187,7 +187,13 @@ esac
case "${shell}" in
fish )
:
cat <<EOS
if functions -q _pyenv_old_prompt
functions -e fish_prompt
functions -c _pyenv_old_prompt fish_prompt
functions -e _pyenv_old_prompt
end
EOS
;;
* )
cat <<EOS

Loading…
取消
儲存