trap - DEBUG useful

This commit is contained in:
pvincent
2026-07-24 11:19:49 +04:00
parent 452bca5e90
commit e20f70f00d
2 changed files with 19 additions and 1 deletions
+18 -1
View File
@@ -56,9 +56,26 @@ function show_error {
# [[ -p /dev/stdout ]] && kill -TERM $$
}
function echo_return {
echo TEXT &&
return 11
return 1
}
declare -F style_ansi >/dev/null || source "$MIAOU_BASH_DIR/lib/ansi.bash"
echo START
echo -n "standard flow:" && show_error
if echo_return; then
echo YOUPI
else
echo ERROR
fi
if echo_return; then
echo YOUPI
else
echo ERROR
fi
# echo -n "standard flow:" && show_error
# echo -n "starting subshell: $(show_error)"