pfetch: only calculate alignment if function exists
This commit is contained in:
parent
760afc0443
commit
2b23aa02bc
3
pfetch
3
pfetch
|
@ -314,7 +314,8 @@ 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
|
||||||
info_length=$((${#info} > info_length ? ${#info} : info_length))
|
type "get_$info" >/dev/null &&
|
||||||
|
info_length=$((${#info} > info_length ? ${#info} : info_length))
|
||||||
done
|
done
|
||||||
|
|
||||||
# Iterate over the above list and run any existing "get_" functions.
|
# Iterate over the above list and run any existing "get_" functions.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user