ned: bug fix

This commit is contained in:
PowerUser64 2022-04-14 14:09:25 -07:00
parent 4b14f66e7e
commit 3af2360084

View file

@ -79,7 +79,8 @@ new() {
# Note dir
NEW_NOTE_DIR="$BASE_DIR/$(cd "$BASE_DIR" && fd -d 1 | sed 's-\./--g' | $FZF_SEARCH "$2")/notes" || exit
[ -d "${NEW_NOTE_DIR%/*}" ] || mkdir "${NEW_NOTE_DIR%/*}"
# make the directory if it doesn't exist
[ -d "${NEW_NOTE_DIR}" ] || mkdir "${NEW_NOTE_DIR}"
if [ -f "$NEW_NOTE_DIR/$NEW_NOTE_NAME" ]; then
open_file "$NEW_NOTE_DIR/$NEW_NOTE_NAME"