think it's working with dating each entry

This commit is contained in:
Tech Priest 2024-07-26 02:59:41 +00:00
parent 6887684fa7
commit bf06a81cb7

5
loggit
View file

@ -32,10 +32,11 @@ fi
if [ ${#} -eq 0 ]; then
if [ -p "/dev/stdin" ]; then
(cat; printf "\n\n") >> "${NOTES_PATH}"
stdin_content=$(cat)
printf "%s %s\n\n" "$(date +"%Y-%m-%d")" "${stdin_content}" >> "${NOTES_PATH}"
else
eval "${NOTES_EDITOR}" "${NOTES_PATH}"
fi
else
printf "%s\n\n" "${*}" >> "${NOTES_PATH}"
printf "%s %s\n\n" "$(date +"%Y-%m-%d")" "${*}" >> "${NOTES_PATH}"
fi