From 930905086410c6426d563ad93ef2ea3f76b57211 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 10 Feb 2021 22:42:18 +0300 Subject: [PATCH] Use a better PS4 as recommeneded by Bash Hackers Wiki it allows to see functions as well as lines, therefore making it possible to see the control flow --- libexec/pyenv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/pyenv b/libexec/pyenv index 93debeae..443bf550 100755 --- a/libexec/pyenv +++ b/libexec/pyenv @@ -7,7 +7,8 @@ if [ "$1" = "--debug" ]; then fi if [ -n "$PYENV_DEBUG" ]; then - export PS4='+ [${BASH_SOURCE##*/}:${LINENO}] ' + # https://wiki-dev.bash-hackers.org/scripting/debuggingtips#making_xtrace_more_useful + export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' set -x fi