Added support for custom date formats
This commit is contained in:
@@ -26,7 +26,7 @@ fi
|
||||
|
||||
# Write an ammendment header
|
||||
if [ -z "$CREATE" ]; then
|
||||
printf "\n %s\n" "edit - $(date)" >> "$TMP_NOTE"
|
||||
printf "\n%s\n" "edit - $(date $DATE_FMT)" >> "$TMP_NOTE"
|
||||
printf "%s\n" "===================================" >> "$TMP_NOTE"
|
||||
fi
|
||||
|
||||
|
||||
@@ -11,7 +11,12 @@ EXT=note # File extension to use (for listing notes)
|
||||
|
||||
#EDITOR= # Preferred Editor:
|
||||
# If you would like to specify a different editor for
|
||||
# sns to use, you may do so here.
|
||||
# sns to use, you may do so here, otherwise, sns will
|
||||
# use the editor specified in the environment.
|
||||
|
||||
DATE_FMT="+%D %T" # Date Format:
|
||||
# If you would like to modify the date format, you may
|
||||
# specify one appropriate to the `date` command.
|
||||
|
||||
ENCRYPTION="FALSE" # Main Encryption Toggle:
|
||||
# WARNING: ANY PREVIOUSLY UNENCRYPTED NOTES WILL BE LOST
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
function p_header(){
|
||||
printf "# %s\n## Date: %s\n" "$(basename ${NOTE%.*})" "$(date)"
|
||||
printf "# %s\n## Date: %s\n" "$(basename ${NOTE%.*})" "$(date "$DATE_FMT")"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user