Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit c0d0d65

Browse files
committed
pfetch: Fix blank lines
1 parent a8a3e1f commit c0d0d65

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pfetch

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,8 +1466,14 @@ main() {
14661466
info_length=$((info_length + 1))
14671467

14681468
while IFS= read -r line || [ "$1" ]; do
1469-
"get_$1"
1470-
shift "$(($# ? 1 : 0))"
1469+
# Iterate over the info skipping any lines
1470+
# which are blank.
1471+
for info; do
1472+
"get_$1"
1473+
shift "$(($# ? 1 : 0))"
1474+
[ "$out" ] && break
1475+
done
1476+
14711477
printf '\033[%sC%s\r%s\n' "$ascii_width" "$out" "$line" >&6
14721478
out=
14731479
done <<-EOF

0 commit comments

Comments
 (0)