From a1bbe9749c9a934d768d57f2bbdc20a92448d247 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 3 Nov 2019 00:45:53 +0000 Subject: [PATCH] pfetch: fix bugs --- pfetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pfetch b/pfetch index 8bf5dfc..46d72a1 100755 --- a/pfetch +++ b/pfetch @@ -1334,7 +1334,7 @@ main() { set -f set +f ${PF_INFO-ascii title os host kernel uptime pkgs memory} - case $* in *ascii*) get_ascii; shift; esac + case $@ in *ascii*) get_ascii; shift; esac # Iterate over the info functions to determine the lengths of the # "info names" for output alignment. The option names and subtitles @@ -1351,7 +1351,7 @@ main() { # Add an additional space of length to act as a gap. info_length=$((info_length + 1)) - while IFS= read -r line; do + while IFS= read -r line || [ "$1" ]; do "get_$1" shift "$(($# ? 1 : 0))" printf '%*.s%s\r%s\n' "$ascii_width" "" "$out" "$line" >&6