From b5429624c2d32ffc911789ea046b25bd10fe81a0 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 10 Feb 2021 22:46:08 +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/rbenv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rbenv b/libexec/rbenv index a1b9d69f..070c441c 100755 --- a/libexec/rbenv +++ b/libexec/rbenv @@ -7,7 +7,8 @@ if [ "$1" = "--debug" ]; then fi if [ -n "$RBENV_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