Ver código fonte

init: zsh: prepend hook to precmd_functions

This makes sure that $VIRTUAL_ENV is handled already in other precmd
functions, especially your prompt.
pull/101/head
Daniel Hahler 9 anos atrás
pai
commit
f594876f31
2 arquivos alterados com 2 adições e 2 exclusões
  1. +1
    -1
      bin/pyenv-virtualenv-init
  2. +1
    -1
      test/init.bats

+ 1
- 1
bin/pyenv-virtualenv-init Ver arquivo

@ -151,7 +151,7 @@ EOS
cat <<EOS
typeset -g -a precmd_functions
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
precmd_functions+=_pyenv_virtualenv_hook;
precmd_functions=(_pyenv_virtualenv_hook \$precmd_functions);
fi
EOS
;;

+ 1
- 1
test/init.bats Ver arquivo

@ -141,7 +141,7 @@ _pyenv_virtualenv_hook() {
};
typeset -g -a precmd_functions
if [[ -z \$precmd_functions[(r)_pyenv_virtualenv_hook] ]]; then
precmd_functions+=_pyenv_virtualenv_hook;
precmd_functions=(_pyenv_virtualenv_hook \$precmd_functions);
fi
EOS
}

Carregando…
Cancelar
Salvar