Remember that the handlers are called when a location is left:
function handler_append () {
local THING=${1:?"missing thing parameter"}
RESULT+=$THING
}
{
local RESULT
handler_append 0
mbfl_location_enter
{
mbfl_location_handler "handler_append 1"
mbfl_location_enter
{
mbfl_location_handler "handler_append 2"
mbfl_location_enter
{
mbfl_location_handler "handler_append 3"
}
mbfl_location_leave
mbfl_location_handler "handler_append 4"
}
mbfl_location_leave
mbfl_location_handler "handler_append 5"
}
mbfl_location_leave
handler_append 6
"$RESULT" ⇒ 0342516
}
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.