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
This commit is contained in:
Ivan Pozdeev 2021-02-10 22:46:08 +03:00
parent 62d7798270
commit b5429624c2

View file

@ -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