pyenv/test/libexec/pyenv-echo
Casey McGinty 83e5459cfb Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.

Related to pyenv/pyenv-virtualenv#259
2019-03-07 22:15:14 +01:00

8 lines
137 B
Text
Executable file

# Usage: pyenv echo [-F<char>] VAR
if [[ $1 == -F* ]]; then
sep="${1:2}"
echo "${!2}" | tr "${sep:-:}" $'\n'
else
echo "${!1}"
fi