pfetch: only calculate alignment if function exists

This commit is contained in:
Dylan Araps 2019-09-24 14:55:52 +03:00
parent 760afc0443
commit 2b23aa02bc

1
pfetch
View File

@ -314,6 +314,7 @@ EOF
# "info names" for output alignment. The option names and subtitles # "info names" for output alignment. The option names and subtitles
# match 1:1 so this is thankfully simple. # match 1:1 so this is thankfully simple.
for info; do for info; do
type "get_$info" >/dev/null &&
info_length=$((${#info} > info_length ? ${#info} : info_length)) info_length=$((${#info} > info_length ? ${#info} : info_length))
done done