From 151e4cb41b62da60c12a3beb45b6478f6c320c38 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 11 Jul 2026 12:07:25 +0400 Subject: [PATCH] todo: exit stderr message --- bin/bash-back | 4 ++++ lib/utility.bash | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/bash-back b/bin/bash-back index 710a6e9..1851702 100755 --- a/bin/bash-back +++ b/bin/bash-back @@ -20,6 +20,10 @@ function on_return { # overridden function which permits stacktracing of original `return` statement function exit { code=${1:-0} + + # TODO: prefer this output, but change the exit case scenario message in stacktrace first! + # >&2 echo "${BASH_SOURCE[2]}:${BASH_LINENO[0]} exit $@" + >&2 echo "${BASH_SOURCE[2]}: line ${BASH_LINENO[0]}: exit $@" builtin exit $code } diff --git a/lib/utility.bash b/lib/utility.bash index 7583c91..32eee46 100644 --- a/lib/utility.bash +++ b/lib/utility.bash @@ -4,10 +4,10 @@ function blabla { } function suite { - # exit 0 - return 7 + exit 10 # youpi + exit echo $nope - exit 10 - return command_not_found + return 7 + return }