General: Fix issue with no info printed if whitespace was in the output
This commit is contained in:
parent
a2cad033d2
commit
7fbe91e8e8
1 changed files with 4 additions and 4 deletions
8
neofetch
8
neofetch
|
@ -2308,15 +2308,15 @@ info() {
|
||||||
eval output="\$${2}"
|
eval output="\$${2}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Trim whitespace
|
||||||
|
output="$(trim "$output")"
|
||||||
|
|
||||||
# If the output is empty, don't print anything
|
# If the output is empty, don't print anything
|
||||||
if [ -z "$output" ]; then
|
if [ -z "$output" ]; then
|
||||||
err "Info: Couldn't detect $subtitle"
|
err "Info: Couldn't detect $subtitle"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Trim whitespace
|
|
||||||
output="$(trim "$output")"
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
title)
|
title)
|
||||||
string="${title_color}${bold}${output}"
|
string="${title_color}${bold}${output}"
|
||||||
|
@ -2637,7 +2637,7 @@ bold() {
|
||||||
# Linebreak {{{
|
# Linebreak {{{
|
||||||
|
|
||||||
getlinebreak() {
|
getlinebreak() {
|
||||||
linebreak=" "
|
linebreak=" "
|
||||||
|
|
||||||
# Calculate info height
|
# Calculate info height
|
||||||
info_height="$((info_height+=1))"
|
info_height="$((info_height+=1))"
|
||||||
|
|
Loading…
Reference in a new issue