Skip to content

Commit

Permalink
mless: list same number of mails whether we're at the beginning or end
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikh authored and leahneukirchen committed Jun 7, 2021
1 parent 6684f74 commit 6e8e4e0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mless
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ if [ "$1" = --filter ]; then
fi

mseq -C "$2"
mscan .-2:.+3 2>/dev/null | colorscan

total=$(mscan -n -- -1)
case $2 in
1) mscan .-0:.+5 ;;
2) mscan .-1:.+4 ;;
$((total - 2))) mscan .-3:.+2 ;;
$((total - 1))) mscan .-4:.+1 ;;
$total) mscan .-5:.+0 ;;
*) mscan .-2:.+3 ;;
esac 2>/dev/null | colorscan
echo

if ! [ -f "$(mseq -r "$2")" ]; then
Expand Down

0 comments on commit 6e8e4e0

Please sign in to comment.