From af438abeaec9632453be96e163d787ee5e78b61b Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 18 May 2015 16:34:02 +0200 Subject: [PATCH] shims: look for python* This is required for the shims to handle `#!/usr/bin/env python3` in a shebang, just like `python` is handled currently: it will set `PYENV_DIR` to the root of the invoked script, which is required for a `.python-version` script to get picked up from there. This was rejected for rbenv, where it does not make much sense (https://github.com/sstephenson/rbenv/pull/735). Ref: https://github.com/yyuu/pyenv/pull/368#issuecomment-102806837 --- libexec/pyenv-rehash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/pyenv-rehash b/libexec/pyenv-rehash index c266b1bf..56756fc3 100755 --- a/libexec/pyenv-rehash +++ b/libexec/pyenv-rehash @@ -46,7 +46,7 @@ set -e [ -n "\$PYENV_DEBUG" ] && set -x program="\${0##*/}" -if [ "\$program" = "python" ]; then +if [[ "\$program" = "python"* ]]; then for arg; do case "\$arg" in -c* | -- ) break ;;