feat(script/note): jump to end of paginater by default

This commit is contained in:
Malte Tammena 2024-04-04 09:40:17 +02:00
parent 8af9f19ab2
commit 5c4c574b27

View file

@ -163,8 +163,8 @@ bat "$XDG_DATA_HOME/life.md/$year.md" |
input_length=$(echo "$input" | wc -l)
# Compare the input length with the maximum allowed length
if ((input_length > max_length)); then
# Input exceeds maximum length - use an external pager like 'less'
echo "$input" | less -r
# Input exceeds maximum length - use an external pager like 'less', but jump to the last line
echo "$input" | less -r +G
else
# Input does not exceed the maximum length - print directly
echo "$input"