Formatting changes
This commit is contained in:
@@ -54,14 +54,17 @@ function delete(){
|
||||
# Given a valid $NOTE, delete removes $NOTE from sns.
|
||||
|
||||
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
|
||||
Y|y)
|
||||
rm "$NOTES_DIR/$NOTE";;
|
||||
*)
|
||||
printf "%s\n " "Aborted.";;
|
||||
esac
|
||||
rm "$NOTES_DIR/$NOTE"
|
||||
printf "%s\n" "- Deleted note: ${NOTE%.*}."
|
||||
;;
|
||||
*)
|
||||
printf "%s\n" "Aborted."
|
||||
;;
|
||||
esac
|
||||
#Cleanup empty notebooks/sections]
|
||||
find "$NOTES_DIR" -mindepth 1 -type d | tac |\
|
||||
while read -r DIR ; do
|
||||
|
||||
Reference in New Issue
Block a user