From 62d70751d5a4379ff0b8e3ea26d0120d36ece51a Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 7 Apr 2020 21:14:22 +0200 Subject: [PATCH] added fix for possible globbing errors and fixed time string in error.log --- bashtop | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bashtop b/bashtop index 2e42ea6..e553789 100755 --- a/bashtop +++ b/bashtop @@ -28,6 +28,8 @@ # limitations under the License. declare LC_MESSAGES="C" LC_NUMERIC="C" +shopt -qu failglob globstar +shopt -qs extglob globasciiranges declare -a banner banner_colors @@ -405,7 +407,7 @@ traperr() { #? Function for reporting error line numbers fi if ((len>100)); then unset 'trace_array[@]'; fi trace_array+=("$err") - printf "%(%X)T %s" "" "ERROR: On line $err $trap_muted" >> "${config_dir}/error.log" + echo "$(printf "%(%X)T") ERROR: On line $err $trap_muted" >> "${config_dir}/error.log" }