From 91288cc3a2dbd75e579626901d33ab66ebd9a7f5 Mon Sep 17 00:00:00 2001 From: jansorg Date: Mon, 20 Apr 2020 21:52:17 +0200 Subject: [PATCH] Syncing bashdb4.4 and bashdb5 trees, wrap more source command args in quotes --- command/info_sub/args.sh | 6 +++--- init/term-background.sh | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/command/info_sub/args.sh b/command/info_sub/args.sh index 2fc56be3..8e267699 100644 --- a/command/info_sub/args.sh +++ b/command/info_sub/args.sh @@ -98,12 +98,12 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then # FIXME: put some of this into a mock _Dbg_libdir=${top_dir} for _Dbg_file in pre vars ; do - source ${top_dir}/init/${_Dbg_file}.sh + source "${top_dir}/init/${_Dbg_file}.sh" done for _Dbg_file in frame msg file journal save-restore alias ; do - source ${top_dir}/lib/${_Dbg_file}.sh + source "${top_dir}/lib/${_Dbg_file}.sh" done - source ${top_dir}/command/help.sh + source "${top_dir}/command/help.sh" _Dbg_set_debugger_entry _Dbg_frame_adjusted_pos() { typeset -i i=${1:-0} diff --git a/init/term-background.sh b/init/term-background.sh index 89f80056..0b00f4a0 100644 --- a/init/term-background.sh +++ b/init/term-background.sh @@ -111,7 +111,7 @@ exit_if_not_sourced() { # User should set up RGB_fg and RGB_bg arrays xterm_compatible_fg_bg() { typeset fg bg junk - stty -echo >/dev/null 2>&1 + if stty -echo >/dev/null 2>&1; then # Issue command to get both foreground and # background color # fg bg @@ -126,6 +126,9 @@ xterm_compatible_fg_bg() { IFS='/' read -ra RGB_bg <<< $bg typeset -p RGB_fg typeset -p RGB_bg + else + stty echo 2>/dev/null + fi return 0 }