[PR] #170 from OldWorldOrdr: Fix color blocks for bash !=3 & <5

This commit is contained in:
Azalea 2023-08-18 12:37:07 -04:00 committed by GitHub
commit edf2a697d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5083,7 +5083,7 @@ 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.
if [[ $BASH_VERSION == 3* ]]; then if [ "${BASH_VERSION%%.*}" -lt 5 ]; then
[[ "$blocks" ]] && cols+="${block_spaces// /${blocks}nl}" [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}nl}"
[[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}" [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}"
else else