From f58ac1ddcd455e9ae32b6e4766167ce3451fe5bd Mon Sep 17 00:00:00 2001 From: terrantechpriest Date: Mon, 22 Jul 2024 18:21:08 +0000 Subject: [PATCH] did a little learning and documenting --- notes | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notes b/notes index 3351903..dd0a81f 100644 --- a/notes +++ b/notes @@ -1,5 +1,8 @@ #!/usr/bin/env sh -# Create a dated text file at a specific location and append text to it. +#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. # # Usage: # $ notes something you want to jot down (appends that text to the file) @@ -10,6 +13,7 @@ # YYYY-MM.txt in your $NOTES_DIRECTORY (this is set below). 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_EDITOR="${EDITOR}"