summaryrefslogtreecommitdiff
path: root/files/config/suckless/scroll/up.sh
blob: fa28a80349c5c7fc5ca3d9e4b526cf6c91268795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -eu
export POSIXLY_CORRECT=1

i=1
while test "$i" -lt 50; do
	echo "$i"
	i=$((i + 1))
done > tmp.log

(sleep 1; printf '\033[5;2~'; sleep 1; ) \
	| ./ptty ./scroll tail -fn 50 tmp.log > out.log

cmp out.log up.log