fix(tui_layout): handle missing and empty string parameters correctly

This commit is contained in:
Sofia
2026-01-17 20:18:15 +08:00
committed by GitHub
parent e99695a2f1
commit e20b33046b

View File

@@ -16,13 +16,15 @@ FULL_DASH="- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# function to print content lines
# (using cursor jump)
content_line() {
echo -e " ${1}\033[${TABLE_WIDTH}G||"
local param="${1:-}"
echo -e " ${param}\033[${TABLE_WIDTH}G||"
}
# function to print sub content lines
# for printing accompanying instructions
sub_content_line() {
echo -e " ${1}\033[${TABLE_WIDTH}G||"
local param="${1:-}"
echo -e " ${param}\033[${TABLE_WIDTH}G||"
content_line
}