did a little learning and documenting
This commit is contained in:
parent
b50de6182b
commit
f58ac1ddcd
1 changed files with 5 additions and 1 deletions
6
notes
6
notes
|
@ -1,5 +1,8 @@
|
||||||
#!/usr/bin/env sh
|
#!/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:
|
# Usage:
|
||||||
# $ notes something you want to jot down (appends that text to the file)
|
# $ 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).
|
# 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}"
|
||||||
|
|
Loading…
Reference in a new issue