aboutsummaryrefslogblamecommitdiff
path: root/bash/bash_profile.d/remind.bash
blob: a8f145998743ec930c7dce764cc43f0dbb0fc23b (plain) (tree)
1
2
3
4
5
6
7
8
9
                              


                         

                          


                                
 



                                                      



                                             

                                   
               
 
# Only if shell is interactive
if [[ $- != *i* ]] ; then
    return
fi

# Only if rem(1) available
if ! hash rem 2>/dev/null ; then
    return
fi

# Only if reminders file exists
if [[ ! -e ${DOTREMINDERS:-$HOME/.reminders} ]] ; then
    return
fi

# Print from subshell to keep namespace clean
(
    while IFS= read -r reminder ; do
        printf '* %s\n' "$reminder"
    done < <(rem -hq)
    printf '\n'
)