Formatting changes

This commit is contained in:
Jon-William Lewis
2016-08-27 13:29:02 -05:00
parent 0f2684bde5
commit f156e9bbe5

View File

@@ -54,14 +54,17 @@ function delete(){
# Given a valid $NOTE, delete removes $NOTE from sns. # Given a valid $NOTE, delete removes $NOTE from sns.
if [ -e "$NOTES_DIR/$NOTE" ]; then if [ -e "$NOTES_DIR/$NOTE" ]; then
read -p "Delete \"$NOTE\"? (Y/N) " YN printf "$RED_COLOR!!$RESET_COLOR %s%s" "Delete " "${NOTE%.*}"
read -p " (y/N) " YN
case "$YN" in case "$YN" in
Y|y) Y|y)
rm "$NOTES_DIR/$NOTE";; rm "$NOTES_DIR/$NOTE"
printf "%s\n" "- Deleted note: ${NOTE%.*}."
;;
*) *)
printf "%s\n " "Aborted.";; printf "%s\n" "Aborted."
;;
esac esac
printf "%s\n" "- Deleted note: ${NOTE%.*}."
#Cleanup empty notebooks/sections] #Cleanup empty notebooks/sections]
find "$NOTES_DIR" -mindepth 1 -type d | tac |\ find "$NOTES_DIR" -mindepth 1 -type d | tac |\
while read -r DIR ; do while read -r DIR ; do