aboutsummaryrefslogtreecommitdiff
path: root/sh/profile.d/downloads.sh
blob: eb2a9b5455a86e2f39618f65d76da9363deae3d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
[ -f "$HOME"/.downloads ] || return
(
    while IFS= read -r dir ; do
        case $dir in
            '#'*) continue ;;
        esac
        [ -d "$dir" ] || continue
        set -- "$dir"/*
        [ -e "$1" ] || shift
        [ "$#" -gt 0 ] || continue
        printf 'You have %u unsorted files in %s.\n' "$#" "$dir"
    done < "$HOME"/.downloads
)