[F] Fix cols coloring reset for bash 3.2

Introduce by #24
This commit is contained in:
Hykilpikonna 2022-10-30 13:11:27 -04:00
parent 77614b635f
commit 700f651378
No known key found for this signature in database
GPG key ID: 256CD01A41D7FA26

View file

@ -4656,8 +4656,13 @@ get_cols() {
printf -v block_spaces "%${block_height}s" printf -v block_spaces "%${block_height}s"
# Convert the spaces into rows of blocks. # Convert the spaces into rows of blocks.
[[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\[mnl}" if [[ $BASH_VERSION == 3* ]]; then
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[mnl}" [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}nl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}"
else
[[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\[mnl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[mnl}"
fi
# Determine the horizontal offset of the blocks. # Determine the horizontal offset of the blocks.
case $col_offset in case $col_offset in