From 89de2492064d3cbc837be5c7b7156bec6945f746 Mon Sep 17 00:00:00 2001 From: David Buchanan Date: Wed, 5 Aug 2026 15:16:24 +0100 Subject: [PATCH] escape ESCs in neofetch src --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 346f0017..95ba5126 100755 --- a/neofetch +++ b/neofetch @@ -5784,11 +5784,11 @@ get_cols() { # Convert the spaces into rows of blocks. if [ "${BASH_VERSION%%.*}" -lt 5 ]; then - [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}nl}" - [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}nl}" + [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\\e[39;49mnl}" + [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\\e[0mnl}" else - [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\[39;49mnl}" - [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\[0mnl}" + [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}\\e\[39;49mnl}" + [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}\\e\[0mnl}" fi # Determine the horizontal offset of the blocks. @@ -5800,7 +5800,7 @@ get_cols() { # Add newlines to the string. cols=${cols%%nl} cols=${cols//nl/ -[${block_offset}C${zws}} +\\e[${block_offset}C${zws}} # Add block height to info height. ((info_height+=block_range[1]>7?block_height+2:block_height+1))