think it's working with dating each entry
This commit is contained in:
parent
6887684fa7
commit
bf06a81cb7
1 changed files with 3 additions and 2 deletions
5
loggit
5
loggit
|
@ -32,10 +32,11 @@ fi
|
||||||
|
|
||||||
if [ ${#} -eq 0 ]; then
|
if [ ${#} -eq 0 ]; then
|
||||||
if [ -p "/dev/stdin" ]; 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
|
else
|
||||||
eval "${NOTES_EDITOR}" "${NOTES_PATH}"
|
eval "${NOTES_EDITOR}" "${NOTES_PATH}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printf "%s\n\n" "${*}" >> "${NOTES_PATH}"
|
printf "%s %s\n\n" "$(date +"%Y-%m-%d")" "${*}" >> "${NOTES_PATH}"
|
||||||
fi
|
fi
|
Loading…
Reference in a new issue