This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
|
#!/bin/sh
|
|
|
|
f=$(cat)
|
|
|
|
if test $(tput lines) -lt $(printf "%s\n" "$f" | wc -l)
|
|
then
|
|
printf "%s\n" "$f" | kak -e '
|
|
exec <a-o>
|
|
map global normal q :q<ret>;
|
|
rmhl global/number-lines;
|
|
set global scrolloff 10,0;
|
|
'
|
|
else
|
|
printf "%s\n" "$f"
|
|
fi
|