From 700f651378a2f92f27fa8fab0593481c1bef882e Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 30 Oct 2022 13:11:27 -0400 Subject: [PATCH] [F] Fix cols coloring reset for bash 3.2 Introduce by #24 --- neofetch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 953a3654..6a463c91 100755 --- a/neofetch +++ b/neofetch @@ -4656,8 +4656,13 @@ get_cols() { printf -v block_spaces "%${block_height}s" # Convert the spaces into rows of blocks. - [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\[mnl}" - [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[mnl}" + if [[ $BASH_VERSION == 3* ]]; then + [[ "$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. case $col_offset in