Fix path_lines function for pyenv

This commit is contained in:
Ivan Malison 2016-08-05 10:00:20 -07:00
parent 36c03fbebc
commit 1656570798
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -1,5 +1,10 @@
function path_lines {
shell_path.py --path-lines "$@"
local python_command
# We need to get a path to the ACTUAL python command because
# pyenv alters PATH before actually executing python, which ends
# up changing PATH in a way that is not desireable.
hash pyenv && python_command="$(pyenv which python)" || python_command="$(which python)"
"$python_command" "$HOME/.lib/python/shell_path.py" --path-lines "$@"
}
function indirect_expand {