Browse Source

better regex

main
pvincent 1 week ago
parent
commit
a1d11f97af
  1. 2
      bin/bash-back
  2. 2
      useless.sh

2
bin/bash-back

@ -78,7 +78,7 @@ function on_exit {
stack_summary+=("ERROR $code: [$message]") stack_summary+=("ERROR $code: [$message]")
fi fi
else else
regex=' .*:[0-9]* .*'
regex="^ .*:[0-9]* .*\$"
[[ "$last_error" =~ $regex ]] || stack_summary+=("ERROR $code: <undefined>") [[ "$last_error" =~ $regex ]] || stack_summary+=("ERROR $code: <undefined>")
fi fi

2
useless.sh

@ -31,8 +31,8 @@ function F3 {
echo start of useless echo start of useless
F3 F3
. lib/utility.bash
lib/utility.bash lib/utility.bash
. lib/utility.bash
# >&2 echo some trace in stderr # >&2 echo some trace in stderr
main main

Loading…
Cancel
Save