diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2019-11-03 00:45:53 +0000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2019-11-03 00:45:53 +0000 |
| commit | a1bbe9749c9a934d768d57f2bbdc20a92448d247 (patch) | |
| tree | cf962e8702ce25e87d95fa4d8c94c3ba3f75d97b | |
| parent | c9b4d260840a4afb44e6803cc987ca80bf5c4d64 (diff) | |
| download | pfetch-a1bbe9749c9a934d768d57f2bbdc20a92448d247.tar.gz | |
pfetch: fix bugs
| -rwxr-xr-x | pfetch | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |
