Formatting changes
This commit is contained in:
@@ -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 " "Aborted.";;
|
|
||||||
esac
|
|
||||||
printf "%s\n" "- Deleted note: ${NOTE%.*}."
|
printf "%s\n" "- Deleted note: ${NOTE%.*}."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "%s\n" "Aborted."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
#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
|
||||||
|
|||||||
Reference in New Issue
Block a user