did a little learning and documenting

This commit is contained in:
Tech Priest 2024-07-22 18:21:08 +00:00
parent b50de6182b
commit f58ac1ddcd

4
notes
View file

@ -1,4 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
#doc: this looks like the shebang, the env and sh make it more portable,
#looking for the environment, and sh to indicate it should be run in the shell
#
#Create a dated text file at a specific location and append text to it. #Create a dated text file at a specific location and append text to it.
# #
# Usage: # Usage:
@ -10,6 +13,7 @@
# YYYY-MM.txt in your $NOTES_DIRECTORY (this is set below). # YYYY-MM.txt in your $NOTES_DIRECTORY (this is set below).
set -e set -e
#doc: this appears to instruct the shell to exit if an error occurs so that the script doesn't start compounding errors
readonly NOTES_DIRECTORY="${NOTES_DIRECTORY:-${HOME}/notes}" readonly NOTES_DIRECTORY="${NOTES_DIRECTORY:-${HOME}/notes}"
readonly NOTES_EDITOR="${EDITOR}" readonly NOTES_EDITOR="${EDITOR}"