blob: a8f145998743ec930c7dce764cc43f0dbb0fc23b (
plain) (
tree)
|
|
# 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'
)
|