pfetch: fix seq not posix
This commit is contained in:
parent
4157b94228
commit
0fec0f70a3
11
pfetch
11
pfetch
|
@ -932,10 +932,13 @@ main() {
|
||||||
# art in height, don't touch the cursor, else move it down N lines.
|
# art in height, don't touch the cursor, else move it down N lines.
|
||||||
cursor_pos=$((info_height > ascii_height ? 0 : ascii_height - info_height))
|
cursor_pos=$((info_height > ascii_height ? 0 : ascii_height - info_height))
|
||||||
|
|
||||||
# Print '$cursor_pos' amount of newlines. Using cursor down doesn't scroll
|
# Print '$cursor_pos' amount of newlines to correctly position the
|
||||||
# the screen correctly if this causes the cursor to hit the bottom of the
|
# cursor. This used to be a 'printf $(seq X X)' however 'seq' is only
|
||||||
# window. Using '0' gives us an extra iteration, adding a bottom line gap.
|
# typically available (by default) on GNU based systems!
|
||||||
printf '%0.s\n' $(seq 0 "$cursor_pos") >&6
|
while [ "${i:-0}" -le "$cursor_pos" ]; do
|
||||||
|
printf '\n'
|
||||||
|
: $((i+=1))
|
||||||
|
done >&6
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user